* added option for 'setModal' method.

* removed unused code.
This commit is contained in:
Catouse
2014-04-16 14:43:27 +08:00
parent 7f6063432c
commit 2bb6dd5793
2 changed files with 12 additions and 10 deletions
-1
View File
@@ -6,7 +6,6 @@ $(document).ready(function()
$("#langs li > a").click(function()
{
selectLang($(this).data('value'));
console.log($(this).data('value'));
});
$('#mobile').popover({html: true, container: 'body'});
+12 -9
View File
@@ -77,7 +77,6 @@ function shortcut()
*/
function showDropMenu(objectType, objectID, module, method, extra)
{
console.log(arguments);
var li = $('#currentItem').closest('li');
if(li.hasClass('show')) {li.removeClass('show'); return;}
@@ -845,13 +844,14 @@ function setModal()
{
var options =
{
url: url,
width: $e.data('width') || 800,
height: $e.data('height') || 'auto',
icon: $e.data('icon') || '?',
title: $e.data('title') || $e.attr('title') || $e.text(),
name: $e.data('name') || 'modalIframe',
cssClass: $e.data('class')
url: url,
width: $e.data('width') || 800,
height: $e.data('height') || 'auto',
icon: $e.data('icon') || '?',
title: $e.data('title') || $e.attr('title') || $e.text(),
name: $e.data('name') || 'modalIframe',
cssClass: $e.data('class'),
headerless: $e.data('headerless') || false
}
options = $.extend(options, setting);
@@ -864,6 +864,10 @@ function setModal()
options.height = $w.height();
options.cssClass += ' fullscreen';
}
if(options.headerless)
{
options.cssClass += ' hide-header';
}
if(options.icon == '?')
{
@@ -1062,7 +1066,6 @@ function setSyncTrigger()
var $this = $(this);
var val = $this.prop('tagName') == 'INPUT' ? $this.val() : $this.html();
var target = $($this.attr('data-sync-target'));
console.log(target);
if(target.prop('tagName') == 'INPUT') target.val(val);
else target.html(val);
});