Skip to content

Commit

Permalink
Megamenu: Support multi-configuration based on access level and language
Browse files Browse the repository at this point in the history
  • Loading branch information
joomlart committed Jun 19, 2013
1 parent ccd9162 commit 2e1eb52
Show file tree
Hide file tree
Showing 15 changed files with 1,036 additions and 459 deletions.
2 changes: 1 addition & 1 deletion source/plg_system_t3/admin/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ button.btn-primary:active {
background: #fff;
border: 1px solid #aaa;
border-top: 0;
top: 29px;
top: 32px;
/*left: 0;*/
box-shadow: 0 4px 5px rgba(0,0,0,.15);
}
Expand Down
19 changes: 14 additions & 5 deletions source/plg_system_t3/admin/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,27 @@ var T3Admin = window.T3Admin || {};
if(rsp){
var json = rsp;
if(rsp.charAt(0) != '[' && rsp.charAt(0) != '{'){
json = rsp.match(/{.*?}/);
json = rsp.match(new RegExp('{[\["].*}'));
if(json && json[0]){
json = json[0];
}
}


if(json && typeof json == 'string'){

rsp = rsp.replace(json, '');

try {
json = $.parseJSON(json);
} catch (e){
json = {
error: T3Admin.langs.unknownError
}
}

if(json && (json.error || json.successful)){
T3Admin.systemMessage(json.error || json.successful);
}
}

T3Admin.systemMessage(rsp || json.error || json.successful);
}
},

Expand All @@ -72,6 +74,13 @@ var T3Admin = window.T3Admin || {};
return false;
});

$('#t3-admin-tb-megamenu').on('click', function(){

window.location.href = T3Admin.megamenuUrl;

return false;
});

//for style toolbar
$('#t3-admin-tb-style-save-save').on('click', function(){
Joomla.submitbutton('style.apply');
Expand Down
109 changes: 104 additions & 5 deletions source/plg_system_t3/admin/megamenu/css/megamenu.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@
#t3-admin-megamenu {
min-height: 800px;
background: url(../images/grid-bg.jpg) top left;
margin: 0 -20px;
/*margin: 0 -20px;*/
position: relative;
}

.admin-inline-toolbox h3 {
font-size: 18px;
line-height: 20px;
}

.t3-admin-header .btn-toolbar {
margin: 15px 0;
}


/* Intro
---------------------*/
Expand Down Expand Up @@ -57,11 +62,11 @@
}

#t3-admin-megamenu .admin-inline-toolbox {
height: 119px;
height: 128px;
}

#t3-admin-mm-tb .admin-toolbox {
height: 119px;
height: 128px;
padding: 20px;
display: none;
box-sizing: border-box;
Expand Down Expand Up @@ -92,9 +97,9 @@

/* Toolbox Actions ---- */
.t3-admin-mm-row .toolbox-actions-group {
height: 100px;
position: absolute;
right: 20px;
top: 20px;
}

.t3-admin-mm-row .toolbox-actions-group button {
Expand All @@ -113,7 +118,11 @@
---------------------*/
#t3-admin-mm-container {
float: left;
margin-left: 20px;
transition: opacity .4s ease-out;
-o-transition: opacity .4s ease-out;
-moz-transition: opacity .4s ease-out;
-webkit-transition: opacity .4s ease-out;
/*margin-left: 20px;*/
}


Expand Down Expand Up @@ -422,6 +431,10 @@
float: none;
}

.chzn-container-multi .chzn-choices {
padding: 1px 0;
}

/* Fix submenu auto open on hover */
#t3-admin-megamenu .dropdown-submenu:hover .dropdown-menu {
display: none;
Expand All @@ -430,3 +443,89 @@
#t3-admin-megamenu .dropdown-submenu:hover > .dropdown-menu {
display: block;
}


/* Header Form Control ---*/
.t3-admin-header .control-group {
width: auto !important;
display: block;
float: left;
margin: 15px 40px 15px 0;
padding: 0;
border: 0;
background: none;
box-shadow: none;
min-height: 30px;
}

.t3-admin-header .control-group.hide {
display: none;
}

.t3-admin-header .control-label {
width: auto !important;
display: block;
float: left;
padding: 8px 0 0 0;
}

.t3-admin-header .controls {
margin: 0 0 0 10px;
width: auto !important;
display: block;
float: left;
padding: 0;
background: none;
}

.t3-admin-header .inputbox,
.t3-admin-header .input {
width: 250px;
font-weight: bold;
}


/* Ajax loader ---*/
#t3-admin-megamenu .ajaxloader {
width: 72px;
height: 72px;
position: absolute;
top: 100px;
left: 50%;
margin-left: -36px;
background: white url(../images/ajaxloader.gif) 50% 50% no-repeat;
border-radius: 3px;
display: none;
}

#t3-admin-megamenu.loading .ajaxloader {
display: block;
}

#t3-admin-megamenu.loading #t3-admin-mm-container {
opacity: 0.4;
}

/* Modal ---*/
.ajax-message {
position: fixed;
top: -100px;
opacity: 0;
left: 50%;
z-index: 1050;
overflow: auto;
width: 400px;
margin-left: -200px;
background-color: #fff;
border-radius: 3px;

transition: all 2s cubic-bezier(0.215, 0.610, 0.355, 1.000);
-o-transition: all 2s cubic-bezier(0.215, 0.610, 0.355, 1.000);
-moz-transition: all 2s cubic-bezier(0.215, 0.610, 0.355, 1.000);
-webkit-transition: all 2s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

.ajax-message.in {
top: 100px;
opacity: 1;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2e1eb52

Please sign in to comment.