mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
added support of filebox
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9005 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b661df93b7
commit
927d8743af
1 changed files with 57 additions and 4 deletions
|
|
@ -73,7 +73,7 @@ jQuery(function($){
|
||||||
.focus(function(){ $(this).click() })
|
.focus(function(){ $(this).click() })
|
||||||
.click(function(){
|
.click(function(){
|
||||||
$menuitems.removeClass('active');
|
$menuitems.removeClass('active');
|
||||||
|
|
||||||
$(this)
|
$(this)
|
||||||
.next('ul').slideToggle(100).end()
|
.next('ul').slideToggle(100).end()
|
||||||
.parent().addClass('active');
|
.parent().addClass('active');
|
||||||
|
|
@ -215,7 +215,7 @@ jQuery(function($){
|
||||||
.focusin(function(){ $(this).mouseenter() })
|
.focusin(function(){ $(this).mouseenter() })
|
||||||
.focusout(function(){
|
.focusout(function(){
|
||||||
var $this = $(this), timer;
|
var $this = $(this), timer;
|
||||||
|
|
||||||
clearTimeout($this.data('timer'));
|
clearTimeout($this.data('timer'));
|
||||||
timer = setTimeout(function(){ if(!$this.find(':focus').length) $this.mouseleave() }, 10);
|
timer = setTimeout(function(){ if(!$this.find(':focus').length) $this.mouseleave() }, 10);
|
||||||
|
|
||||||
|
|
@ -461,7 +461,7 @@ $('.modulefinder')
|
||||||
// Sortable table
|
// Sortable table
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
|
|
||||||
var
|
var
|
||||||
dragging = false,
|
dragging = false,
|
||||||
$holder = $('<tr class="placeholder"><td> </td></tr>');
|
$holder = $('<tr class="placeholder"><td> </td></tr>');
|
||||||
|
|
||||||
|
|
@ -621,7 +621,7 @@ $('.multiLangEdit')
|
||||||
$this.addClass('loading');
|
$this.addClass('loading');
|
||||||
|
|
||||||
if($ul.parent().is(':visible')) $ul.parent().hide();
|
if($ul.parent().is(':visible')) $ul.parent().hide();
|
||||||
|
|
||||||
$.exec_json(
|
$.exec_json(
|
||||||
'module.getLangListByLangcodeForAutoComplete',
|
'module.getLangListByLangcodeForAutoComplete',
|
||||||
{search_keyword:val},
|
{search_keyword:val},
|
||||||
|
|
@ -708,3 +708,56 @@ $('.multiLangEdit')
|
||||||
f_timer = setTimeout(check, 10);
|
f_timer = setTimeout(check, 10);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// filebox
|
||||||
|
jQuery(function($){
|
||||||
|
|
||||||
|
$('.filebox')
|
||||||
|
.bind('before-open.mw', function(){
|
||||||
|
var $list, $parentObj;
|
||||||
|
var key, anchor;
|
||||||
|
|
||||||
|
key = $(this).attr('filebox_key');
|
||||||
|
anchor = $(this).attr('href');
|
||||||
|
|
||||||
|
$list = $(anchor).find('.filebox_list');
|
||||||
|
|
||||||
|
function on_complete(data){
|
||||||
|
$list.html(data.html);
|
||||||
|
|
||||||
|
$list.find('.lined .select')
|
||||||
|
.bind('click', function(event){
|
||||||
|
var selectedImgSrc = $(this).parent().find('img.filebox_item').attr('src');
|
||||||
|
$('.filebox').trigger('filebox.selected', [key, selectedImgSrc]);
|
||||||
|
$('.filebox').trigger('close.mw');
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$list.find('.pagination')
|
||||||
|
.find('a')
|
||||||
|
.filter(function(){
|
||||||
|
if ($(this).hasClass('tgAnchor')) return false;
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.bind('click', function(){
|
||||||
|
var page = $(this).attr('page');
|
||||||
|
|
||||||
|
$.exec_json('module.getFileBoxListHtml', {'page': page}, on_complete);
|
||||||
|
$(window).scrollTop($(anchor).find('.modalClose').offset().top);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#FileBoxGoTo')
|
||||||
|
.find('button')
|
||||||
|
.bind('click', function(){
|
||||||
|
var page = $(this).prev('input').val();
|
||||||
|
|
||||||
|
$.exec_json('module.getFileBoxListHtml', {'page': page}, on_complete);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$.exec_json('module.getFileBoxListHtml', {'page': '1'}, on_complete);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue