mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
data-toggle, data-show, data-hide JS function enhancement.
board module UI enhancement. git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12219 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
66e2363b43
commit
f9ca200edf
8 changed files with 23 additions and 7 deletions
|
|
@ -45,6 +45,10 @@ jQuery(function($){
|
|||
// TARGET toggle
|
||||
$(document.body).on('click', '.x [data-toggle]', function(){
|
||||
var $this = $(this);
|
||||
if($this.is('a') && $this.attr('href') != $this.attr('data-toggle')){
|
||||
var target = $this.attr('href');
|
||||
$this.attr('data-toggle', target);
|
||||
}
|
||||
var $target = $($this.attr('data-toggle'));
|
||||
var focusable = 'a,input,button,textarea,select';
|
||||
$target.toggle();
|
||||
|
|
@ -59,12 +63,21 @@ jQuery(function($){
|
|||
});
|
||||
// TARGET show
|
||||
$(document.body).on('click', '.x [data-show]', function(){
|
||||
$($(this).attr('data-show')).show().attr('tabindex','0').focus();
|
||||
var $this = $(this);
|
||||
if($this.is('a') && $this.attr('href') != $this.attr('data-show')){
|
||||
var target = $this.attr('href');
|
||||
$this.attr('data-show', target);
|
||||
}
|
||||
$($this.attr('data-show')).show().attr('tabindex','0').focus();
|
||||
return false;
|
||||
});
|
||||
// TARGET hide
|
||||
$(document.body).on('click', '.x [data-hide]', function(){
|
||||
var $this = $(this);
|
||||
if($this.is('a') && $this.attr('href') != $this.attr('data-hide')){
|
||||
var target = $this.attr('href');
|
||||
$this.attr('data-hide', target);
|
||||
}
|
||||
$($this.attr('data-hide')).hide();
|
||||
$this.focus();
|
||||
return false;
|
||||
|
|
|
|||
2
modules/admin/tpl/js/admin.min.js
vendored
2
modules/admin/tpl/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue