Skip to content

Commit

Permalink
Merge branch 'release/140820'
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Aug 29, 2014
2 parents c259847 + d3823eb commit 5fbf799
Show file tree
Hide file tree
Showing 12 changed files with 857 additions and 196 deletions.
27 changes: 27 additions & 0 deletions quick-cache/client-s/css/menu-pages.css
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,30 @@ Menu page styles.
{
background : #637041;
}
.plugin-menu-page input::-webkit-input-placeholder
{
color : rgba(255, 255, 255, 0.2);
font-style : italic;
padding-top : 3px;
}
.plugin-menu-page input::-moz-placeholder
{
color : rgba(255, 255, 255, 0.2);
font-style : italic;
padding-top : 3px;
}
.plugin-menu-page input:-moz-placeholder
{
color : rgba(255, 255, 255, 0.2);
font-style : italic;
padding-top : 3px;
}
.plugin-menu-page input:-ms-input-placeholder
{
color : rgba(255, 255, 255, 0.2);
font-style : italic;
padding-top : 3px;
}
.plugin-menu-page input[disabled],
.plugin-menu-page select[disabled],
.plugin-menu-page textarea[disabled]
Expand Down Expand Up @@ -279,6 +303,9 @@ Panel styles.
}
.plugin-menu-page-panel-heading
{
display : block;
text-decoration : none;

z-index : 1;
position : relative;

Expand Down
2 changes: 1 addition & 1 deletion quick-cache/client-s/css/menu-pages.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 40 additions & 39 deletions quick-cache/client-s/js/menu-pages.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,45 @@
(function($)
{
'use strict'; // Standards.
{
'use strict'; // Standards.

var plugin = {}, $window = $(window), $document = $(document);
var plugin = {}, $window = $(window), $document = $(document);

plugin.onReady = function() // jQuery DOM ready event handler.
{
var $menuPage = $('#plugin-menu-page');
plugin.onReady = function() // jQuery DOM ready event handler.
{
var $menuPage = $('#plugin-menu-page');

$('.plugin-menu-page-panels-open', $menuPage).on('click', function()
{
$('.plugin-menu-page-panel-heading', $menuPage).addClass('open')
.next('.plugin-menu-page-panel-body').addClass('open');
});
$('.plugin-menu-page-panels-close', $menuPage).on('click', function()
{
$('.plugin-menu-page-panel-heading', $menuPage).removeClass('open')
.next('.plugin-menu-page-panel-body').removeClass('open');
});
$('.plugin-menu-page-panel-heading', $menuPage).on('click', function()
{
$(this).toggleClass('open').next('.plugin-menu-page-panel-body').toggleClass('open');
});
$('[data-action]', $menuPage).on('click', function()
{
var $this = $(this), data = $this.data();
if(typeof data.confirmation !== 'string' || confirm(data.confirmation))
location.href = data.action;
});
$('select[name$="_enable\\]"], select[name$="_enable_flavor\\]"]', $menuPage).not('.no-if-enabled').on('change', function()
{
var $this = $(this), thisName = $this[0].name, thisValue = $this.val(),
$thisPanel = $this.closest('.plugin-menu-page-panel');
$('.plugin-menu-page-panels-open', $menuPage).on('click', function()
{
$('.plugin-menu-page-panel-heading', $menuPage).addClass('open')
.next('.plugin-menu-page-panel-body').addClass('open');
});
$('.plugin-menu-page-panels-close', $menuPage).on('click', function()
{
$('.plugin-menu-page-panel-heading', $menuPage).removeClass('open')
.next('.plugin-menu-page-panel-body').removeClass('open');
});
$('.plugin-menu-page-panel-heading', $menuPage).on('click', function(e)
{
e.preventDefault(), // Prevent click event.
$(this).toggleClass('open').next('.plugin-menu-page-panel-body').toggleClass('open');
});
$('[data-action]', $menuPage).on('click', function()
{
var $this = $(this), data = $this.data();
if(typeof data.confirmation !== 'string' || confirm(data.confirmation))
location.href = data.action;
});
$('select[name$="_enable\\]"], select[name$="_enable_flavor\\]"]', $menuPage).not('.no-if-enabled').on('change', function()
{
var $this = $(this), thisName = $this[0].name, thisValue = $this.val(),
$thisPanel = $this.closest('.plugin-menu-page-panel');

if((thisName.indexOf('_enable]') !== -1 && (thisValue === '' || thisValue === '1'))
|| (thisName.indexOf('_flavor]') !== -1 && thisValue !== '0')) // Enabled?
$thisPanel.find('.plugin-menu-page-panel-if-enabled').css('opacity', 1).find(':input').removeAttr('readonly');
else $thisPanel.find('.plugin-menu-page-panel-if-enabled').css('opacity', 0.4).find(':input').attr('readonly', 'readonly');
})
.trigger('change'); // Initialize.
};
$document.ready(plugin.onReady); // On DOM ready.
})(jQuery);
if((thisName.indexOf('_enable]') !== -1 && (thisValue === '' || thisValue === '1'))
|| (thisName.indexOf('_flavor]') !== -1 && thisValue !== '0')) // Enabled?
$thisPanel.find('.plugin-menu-page-panel-if-enabled').css('opacity', 1).find(':input').removeAttr('readonly');
else $thisPanel.find('.plugin-menu-page-panel-if-enabled').css('opacity', 0.4).find(':input').attr('readonly', 'readonly');
})
.trigger('change'); // Initialize.
};
$document.ready(plugin.onReady); // On DOM ready.
})(jQuery);
2 changes: 1 addition & 1 deletion quick-cache/client-s/js/menu-pages.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5fbf799

Please sign in to comment.