Skip to content

Commit e089f96

Browse files
Updated
1. Close Offcanvas and mobile menu on one page 2. One page at all menu 3. Shortcode change for clear cache now DEL button
1 parent edd91f9 commit e089f96

File tree

4 files changed

+44
-5
lines changed

4 files changed

+44
-5
lines changed

astroid/astroid-framework/assets/js/astroid.js

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,10 +649,10 @@ var Admin = new AstroidAdmin();
649649
$("#astroid-form").submit();
650650
return false
651651
}
652-
if ((e.metaKey || e.ctrlKey) && ( String.fromCharCode(e.which).toLowerCase() === 'p') ) {
652+
if(e.keyCode == 46) {
653653
$("#clear-cache").click();
654-
return false
655-
}
654+
return false
655+
}
656656
});
657657
getGoogleFonts();
658658
initAstroidUploader();
@@ -693,6 +693,36 @@ var Admin = new AstroidAdmin();
693693
var _id = _field.data('typography-field');
694694
var _preview = $('.astroid-typography-preview.' + _id + '-astroid-typography-preview');
695695
var _property = _field.data('typography-property');
696+
$("#"+_id+"IsMobile").click(function(e){
697+
e.preventDefault();
698+
$(".Mobile").css("display","block");
699+
$(".Laptop").css("display","none");
700+
$(".Desktop").css("display","none");
701+
$("#"+_id+"IsMobile").addClass("res-active");
702+
$("#"+_id+"IsLaptop").removeClass("res-active");
703+
$("#"+_id+"IsDesktop").removeClass("res-active");
704+
});
705+
706+
$("#"+_id+"IsLaptop").click(function(e){
707+
e.preventDefault();
708+
$(".Mobile").css("display","none");
709+
$(".Laptop").css("display","block");
710+
$(".Desktop").css("display","none");
711+
$("#"+_id+"IsMobile").removeClass("res-active");
712+
$("#"+_id+"IsLaptop").addClass("res-active");
713+
$("#"+_id+"IsDesktop").removeClass("res-active");
714+
});
715+
716+
$("#"+_id+"IsDesktop").click(function(e){
717+
e.preventDefault();
718+
$(".Mobile").css("display","none");
719+
$(".Laptop").css("display","none");
720+
$(".Desktop").css("display","block");
721+
$("#"+_id+"IsMobile").removeClass("res-active");
722+
$("#"+_id+"IsLaptop").removeClass("res-active");
723+
$("#"+_id+"IsDesktop").addClass("res-active");
724+
});
725+
696726
var _unit = _field.data('unit');
697727

698728
if (_property == 'font-style') {

astroid/astroid-framework/assets/js/astroid.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

astroid/astroid-template-zero/frontend/header/menu/link.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
if($validonepagelink == '0' && (strlen($item->link) > 1)){
105105
// Default we assume that you only want the one page for the homepage. If you want one page to work on other pages, please go ahead and hard code the full page URL i.e. https://yoursite.com/pageurl#onepageblockid
106106
// $item->link = JURI::root().$item->link;
107-
$item->link = JURI::root().$item->link;
107+
$item->link = JUri::getInstance().$item->link;
108108
}
109109
}
110110
?>

astroid/astroid-template-zero/js/vendor/jquery.offcanvas.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
if (_class == '' || typeof _class == 'undefined' || _class == 'undefined' || _class == null) {
2222
_class = 'astroid-offcanvas';
2323
}
24+
25+
// Added for click then close the Offcanvas the Menu
26+
var _li = $(_content).find('li');
27+
var _li_a = _li.find("a");
28+
_li_a.click(function(){
29+
_reset();
30+
});
31+
32+
2433
$('body').addClass(_dir);
2534
var _reset = function () {
2635
_container.removeClass(_class + '-open');

0 commit comments

Comments
 (0)