* replaced 'colorbox' with 'modal' in zui.
This commit is contained in:
@@ -759,6 +759,7 @@ EOT;
|
||||
|
||||
/**
|
||||
* Close colorbox in javascript.
|
||||
* This is a obsolete method, you can use 'closeModal' instead.
|
||||
*
|
||||
* @param string $window
|
||||
* @static
|
||||
@@ -766,10 +767,23 @@ EOT;
|
||||
* @return void
|
||||
*/
|
||||
static public function closeColorbox($window = 'self')
|
||||
{
|
||||
return self::closeModal($window);
|
||||
}
|
||||
|
||||
/**
|
||||
* Close modal with javascript.
|
||||
*
|
||||
* @param string $window
|
||||
* @static
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
static public function closeModal($window = 'self')
|
||||
{
|
||||
$js = self::start();
|
||||
$js .= "if($window.location.href == self.location.href){ $window.window.close();}";
|
||||
$js .= "else{ $window.$.cookie('selfClose', 1);$window.$.colorbox.close();}";
|
||||
$js .= "else{ $window.$.cookie('selfClose', 1);$window.$.closeModal();}";
|
||||
$js .= self::end();
|
||||
return $js;
|
||||
}
|
||||
|
||||
@@ -628,7 +628,7 @@ class bug extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($bugID, $actionID);
|
||||
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -657,7 +657,7 @@ class bug extends control
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$actionID = $this->action->create('bug', $bugID, 'bugConfirmed', $this->post->comment);
|
||||
$this->sendmail($bugID, $actionID);
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -716,7 +716,7 @@ class bug extends control
|
||||
$confirmURL = $this->createLink('task', 'view', "taskID=$bug->toTask");
|
||||
echo js::confirm(sprintf($this->lang->bug->remindTask, $bug->toTask), $confirmURL, '', 'parent');
|
||||
}
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -772,7 +772,7 @@ class bug extends control
|
||||
$files = $this->loadModel('file')->saveUpload('bug', $bugID);
|
||||
$actionID = $this->action->create('bug', $bugID, 'Activated', $this->post->comment);
|
||||
$this->sendmail($bugID, $actionID);
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -807,7 +807,7 @@ class bug extends control
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$actionID = $this->action->create('bug', $bugID, 'Closed', $this->post->comment);
|
||||
$this->sendmail($bugID, $actionID);
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
.content .stepTitle{margin:7px 0 7px -15px; display:block; color: green}
|
||||
.content .stepTitle{display:block; color: green}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("a.customFields").colorbox({width:680, height:400, iframe:true, transition:'none'});
|
||||
$('#' + browseType + 'Tab').addClass('active');
|
||||
$('#module' + moduleID).addClass('active');
|
||||
if(browseType == 'bysearch') ajaxGetSearchForm();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
function setModal4List(colorboxClass, replaceID)
|
||||
{
|
||||
if(onlybody != 'yes') $('.iframe').modalTrigger({width:900, height:500, type:'iframe', afterHide:function(){parent.location.href=parent.location.href;}})
|
||||
}
|
||||
|
||||
@@ -12,20 +12,28 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $bug->title;?></caption>
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['bug']) . ' #' . $bug->id;;?></span>
|
||||
<strong><?php echo html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title, '_blank');?></strong>
|
||||
<small class='text-success'> <?php echo $lang->bug->activate;?> <?php echo html::icon($lang->icons['activate']);?></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->assignedTo;?></td>
|
||||
<th class='w-80px'><?php echo $lang->bug->assignedTo;?></th>
|
||||
<td><?php echo html::select('assignedTo', $users, $bug->resolvedBy, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->openedBuild;?></td>
|
||||
<td><?php echo html::select('openedBuild[]', $builds, $bug->openedBuild, 'size=4 multiple=multiple class=select-3');?></td>
|
||||
<th><?php echo $lang->bug->openedBuild;?></th>
|
||||
<td><?php echo html::select('openedBuild[]', $builds, $bug->openedBuild, 'size=4 multiple=multiple class="form-control chosen"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->comment;?></td>
|
||||
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->files;?></th>
|
||||
@@ -35,6 +43,8 @@
|
||||
<td colspan='2' class='text-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->bugList);?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</form>
|
||||
<div class='main'>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['bug']);?></span>
|
||||
|
||||
@@ -6,9 +6,6 @@ if($config->debug)
|
||||
js::import($jsRoot . 'jquery/chosen/min.js');
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
#colorbox, #cboxOverlay, #cboxWrapper{z-index:9999;}
|
||||
</style>
|
||||
<script>
|
||||
noResultsMatch = '<?php echo $lang->noResultsMatch;?>';
|
||||
chooseUsersToMail = '<?php echo $lang->chooseUsersToMail;?>';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script language='Javascript'>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(".right a").colorbox({width:500, height:200, iframe:true, transition:'none'}); // The create lib link.
|
||||
$("#modulemenu a:contains('<?php echo $lang->doc->editLib;?>')").colorbox({width:500, height:200, iframe:true, transition:'none'}); // The edit lib link.
|
||||
$(".right a").modalTrigger({width:500, height:200, type:'iframe'}); // The create lib link.
|
||||
$("#modulemenu a:contains('<?php echo $lang->doc->editLib;?>')").modalTrigger({width:500, height:200, type:'iframe'}); // The edit lib link.
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -5,5 +5,4 @@ $(function()
|
||||
$('#extendWin').height(showHeight);
|
||||
|
||||
$('.panel a.list-group-item').click(function(){$('.panel a.list-group-item.active').removeClass('active'); $(this).addClass('active')});
|
||||
if($('a.iframe').size()) $("a.iframe").colorbox({width:800, height:400, iframe:true, transition:'none', scrolling:true});
|
||||
});
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
// if($('a.manual').size()) $("a.manual").colorbox({width:1024, height:600, iframe:true, transition:'none', scrolling:false});
|
||||
$(function()
|
||||
{
|
||||
$("a.extension").modalTrigger({width:1024, height:600, type:'iframe'});
|
||||
$("a.extension, a.manual").modalTrigger({width:1024, height:600, type:'iframe'});
|
||||
})
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
<style>
|
||||
body{padding-bottom:0px}
|
||||
</style>
|
||||
@@ -25,7 +24,7 @@ function setFileName()
|
||||
|
||||
function closeWindow()
|
||||
{
|
||||
parent.$.fn.colorbox.close();
|
||||
parent.$.closeModal();
|
||||
clearInterval(time);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
<script>
|
||||
function setDownloading()
|
||||
{
|
||||
@@ -26,7 +25,7 @@ function closeWindow()
|
||||
{
|
||||
if($.cookie('downloading') == 1)
|
||||
{
|
||||
parent.$.fn.colorbox.close();
|
||||
parent.$.closeModal();
|
||||
$.cookie('downloading', null);
|
||||
clearInterval(time);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ $sessionString .= session_name() . '=' . session_id();
|
||||
<style>.button-c {padding:1px}</style>
|
||||
<script language='Javascript'>
|
||||
$(function(){
|
||||
$(".edit").colorbox({width:350, height:160, iframe:true, transition:'none', scrolling:true});
|
||||
$(".edit").modalTrigger({width:350, type:'iframe'});
|
||||
})
|
||||
|
||||
/* Delete a file. */
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
<form method='post' action='<?php echo $this->createLink('install', 'step3');?>'>
|
||||
<table align='center' class='table-6'>
|
||||
<caption><?php echo $lang->install->setConfig;?></caption>
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
<?php if(isset($error)):?>
|
||||
<table class='table-6' align='center'>
|
||||
<caption><?php echo $lang->install->error;?></caption>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("a.iframe").colorbox({width:640, height:480, iframe:true, transition:'none'});
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<script language='Javascript'>
|
||||
$(function(){
|
||||
$(".preview").colorbox({width:1000, height:700, iframe:true, transition:'elastic', speed:350, scrolling:true});
|
||||
$(".preview").modalTrigger({width:1000, type:'iframe'});
|
||||
})
|
||||
var browseType = '<?php echo $browseType;?>';
|
||||
</script>
|
||||
|
||||
@@ -3,11 +3,11 @@ function loadStoriesAndBugs(buildID,productID)
|
||||
link = createLink('release', 'ajaxGetStoriesAndBugs', 'buildID=' + buildID + '&productID=' + productID);
|
||||
$('#linkStoriesAndBugs').load(link, function()
|
||||
{
|
||||
$("a.preview").colorbox({width:1000, height:550, iframe:true, transition:'none', scrolling:true});
|
||||
$("a.preview").modalTrigger({width:1000, type:'iframe'});
|
||||
})
|
||||
}
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("a.preview").colorbox({width:1000, height:550, iframe:true, transition:'none', scrolling:true});
|
||||
$("a.preview").modalTrigger({width:1000, type:'iframe'});
|
||||
})
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
<script>
|
||||
function setDownloading()
|
||||
{
|
||||
@@ -26,7 +25,7 @@ function closeWindow()
|
||||
{
|
||||
if($.cookie('downloading') == 1 || i >= 30)
|
||||
{
|
||||
parent.$.fn.colorbox.close();
|
||||
parent.$.closeModal();
|
||||
$.cookie('downloading', null);
|
||||
clearInterval(time);
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ class story extends control
|
||||
$actionID = $this->action->create('story', $storyID, 'Activated', $this->post->comment);
|
||||
$this->sendmail($storyID, $actionID);
|
||||
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -611,7 +611,7 @@ class story extends control
|
||||
$actionID = $this->action->create('story', $storyID, 'Closed', $this->post->comment, ucfirst($this->post->closedReason));
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($storyID, $actionID);
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate(inlink('view', "storyID=$storyID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ class task extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -454,7 +454,7 @@ class task extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
}
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ class task extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->task->recordEstimate($taskID);
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ class task extends control
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -616,7 +616,7 @@ class task extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
}
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -690,7 +690,7 @@ class task extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
}
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -724,7 +724,7 @@ class task extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
}
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ $(function()
|
||||
{
|
||||
$("#story").chosen({no_results_text: noResultsMatch});
|
||||
$("#mailto").chosen({no_results_text: noResultsMatch});
|
||||
$('.iframe').colorbox({width:900, height:500, iframe:true, transition:'none', onCleanup:function(){parent.location.href=parent.location.href;}});
|
||||
$('.iframe').modalTrigger({width:900, type:'iframe', afterHide:function(){parent.location.href=parent.location.href;}});
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,5 +6,5 @@ function assign(taskID, assignedTo)
|
||||
}
|
||||
$(function()
|
||||
{
|
||||
if(onlybody != 'yes') $('.iframe').colorbox({width:900, height:500, iframe:true, transition:'none', onCleanup:function(){parent.location.href=parent.location.href;}});
|
||||
if(onlybody != 'yes') $('.iframe').modalTrigger({width:900, type:'iframe', afterHide:function(){parent.location.href=parent.location.href;}});
|
||||
})
|
||||
|
||||
@@ -18,5 +18,5 @@ function setPreview()
|
||||
$(function()
|
||||
{
|
||||
$("#story").chosen({no_results_text: noResultsMatch});
|
||||
$("#preview").colorbox({width:960, height:550, iframe:true, transition:'none', scrolling:true});
|
||||
$("#preview").modalTrigger({width:960, type:'iframe'});
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
if(onlybody != 'yes')$(".runCase").colorbox({width:900, height:550, iframe:true, transition:'none', onCleanup:function(){parent.location.href=parent.location.href;}});
|
||||
if(onlybody != 'yes')$(".results").colorbox({width:900, height:550, iframe:true, transition:'none'});
|
||||
if(onlybody != 'yes')$(".runCase").modalTrigger({width:900, type:'iframe', afterHide:function(){parent.location.href=parent.location.href;}});
|
||||
if(onlybody != 'yes')$(".results").modalTrigger({width:900, type:'iframe'});
|
||||
})
|
||||
|
||||
@@ -13,7 +13,7 @@ function closeWindow()
|
||||
{
|
||||
if($.cookie('downloading') == 1)
|
||||
{
|
||||
parent.$.fn.colorbox.close();
|
||||
parent.$.closeModal();
|
||||
$.cookie('downloading', null);
|
||||
clearInterval(time);
|
||||
}
|
||||
|
||||
@@ -627,7 +627,7 @@ class testtask extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
die(js::closeColorbox('parent'));
|
||||
die(js::closeModal('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ function browseBySearch(active)
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
setModal4List('runCase', 'caseList', function(){$(".iframe").colorbox({width:1024, height:550, iframe:true, transition:'none'});}, 1024);
|
||||
setModal4List('runCase', 'caseList', function(){$(".iframe").modalTrigger({width:1024, type:'iframe'});}, 1024);
|
||||
$('#' + browseType + 'Tab').addClass('active');
|
||||
$('#module' + moduleID).addClass('active');
|
||||
if(browseType == 'bysearch') ajaxGetSearchForm();
|
||||
@@ -28,7 +28,6 @@ $(document).ready(function()
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("a.iframe").colorbox({width:1024, height:550, iframe:true, transition:'none'});
|
||||
$('#' + browseType + 'Tab').addClass('active');
|
||||
$('#module' + moduleID).addClass('active');
|
||||
});
|
||||
|
||||
@@ -121,7 +121,7 @@ class todo extends control
|
||||
$actionID = $this->loadModel('action')->create('todo', $todoID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
if(isonlybody())die(js::closeColorbox('parent.parent'));
|
||||
if(isonlybody())die(js::closeModal('parent.parent'));
|
||||
die(js::locate(inlink('view', "todoID=$todoID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,3 @@ function syncProductOrProject(obj, type)
|
||||
$('#copyModule').attr('onclick', null);
|
||||
$('#copyModule').bind('click', function(){syncModule(obj.value, viewType)});
|
||||
}
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("a.iframe").colorbox({width:480, height:240, iframe:true, transition:'none'});
|
||||
});
|
||||
|
||||
@@ -38,8 +38,3 @@ function syncProject(obj)
|
||||
$('#copyModule').attr('onclick', null);
|
||||
$('#copyModule').bind('click', function(){syncModule(obj.value, 'task')});
|
||||
}
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("a.iframe").colorbox({width:480, height:240, iframe:true, transition:'none'});
|
||||
});
|
||||
|
||||
@@ -12,4 +12,4 @@ $(".todo-date").datePicker({createButton:true, startDate:startDate, maxDate:'%y-
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".colorbox").colorbox({width:960, height:550, iframe:true, transition:'none'});
|
||||
$(".colorbox").modalTrigger({width:960, type:'iframe'});
|
||||
|
||||
@@ -159,7 +159,7 @@ class webapp extends control
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
echo js::alert($this->lang->webapp->successInstall);
|
||||
die(js::closeColorbox('parent.parent'));
|
||||
die(js::closeModal('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->webapp->common . $this->lang->colon . $this->lang->webapp->install;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
if($('a.iframe').size())
|
||||
{
|
||||
$("a.iframe").colorbox({width:450, height:190, iframe:true, transition:'none', scrolling:true, onCleanup:function()
|
||||
$("a.iframe").modalTrigger({width:450, type:'iframe', afterHide:function()
|
||||
{
|
||||
var selfClose = $.cookie('selfClose');
|
||||
if(selfClose != 1) return;
|
||||
@@ -8,13 +8,13 @@ if($('a.iframe').size())
|
||||
$.cookie('selfClose', 0);
|
||||
}});
|
||||
}
|
||||
if($('a.webapp').size()) $("a.webapp").colorbox({width:700, height:400, iframe:true, transition:'none', scrolling:true});
|
||||
if($('a.apiapp').size()) $("a.apiapp").colorbox({width:700, height:330, iframe:true, transition:'none', scrolling:true});
|
||||
if($('a.popup').size()) $("a.popup").colorbox({width:900, height:600, iframe:true, transition:'none', scrolling:true});
|
||||
if($('a.webapp').size()) $("a.webapp").modalTrigger({width:700, type:'iframe'});
|
||||
if($('a.apiapp').size()) $("a.apiapp").modalTrigger({width:700, type:'iframe'});
|
||||
if($('a.popup').size()) $("a.popup").modalTrigger({width:900, type:'iframe'});
|
||||
|
||||
function popup(width, height)
|
||||
{
|
||||
if(width != 0 && height != 0) $("a.popup").colorbox({width:width, height:height});
|
||||
if(width != 0 && height != 0) $("a.popup").modalTrigger({width:width, height:height});
|
||||
}
|
||||
|
||||
var show = new Array();
|
||||
|
||||
+70
-5
@@ -427,10 +427,12 @@ function setForm()
|
||||
submitObj = $(this).find(':submit');
|
||||
if($(submitObj).size() == 1)
|
||||
{
|
||||
submitLabel = $(submitObj).attr('value');
|
||||
var isBtn = submitObj.prop('tagName') == "BUTTON";
|
||||
submitLabel = isBtn ? $(submitObj).text() : $(submitObj).attr('value');
|
||||
$(submitObj).attr('disabled', 'disabled');
|
||||
$(submitObj).attr('value', config.submitting);
|
||||
$(submitObj).addClass('button-d');
|
||||
var submitting = submitObj.attr('data-submitting') || config.submitting;
|
||||
if(isBtn) submitObj.text(submitting);
|
||||
else $(submitObj).attr('value', submitting);
|
||||
formClicked = true;
|
||||
}
|
||||
});
|
||||
@@ -440,7 +442,8 @@ function setForm()
|
||||
if(formClicked)
|
||||
{
|
||||
$(submitObj).removeAttr('disabled');
|
||||
$(submitObj).attr('value', submitLabel);
|
||||
if(submitObj.prop('tagName') == "BUTTON") submitObj.text(submitLabel);
|
||||
else $(submitObj).attr('value', submitLabel);
|
||||
$(submitObj).removeClass('button-d');
|
||||
}
|
||||
formClicked = false;
|
||||
@@ -856,6 +859,12 @@ function setModal()
|
||||
modalBody.animate({height: $frame.find('body').addClass('body-modal').outerHeight()}, 100);
|
||||
}, 100);
|
||||
}
|
||||
|
||||
var iframe$ = window.frames[options.name].$;
|
||||
if(iframe$)
|
||||
{
|
||||
iframe$.extend({'closeModal': $.closeModal});
|
||||
}
|
||||
}
|
||||
catch(e){}
|
||||
}
|
||||
@@ -897,9 +906,17 @@ function setModal()
|
||||
$('<div id="ajaxModal" class="modal fade"></div>').appendTo('body');
|
||||
}
|
||||
|
||||
$ajaxModal = $('#ajaxModal');
|
||||
$.extend({'closeModal':function(callback)
|
||||
{
|
||||
$ajaxModal.on('hidden.bs.modal', callback);
|
||||
$ajaxModal.modal('hide');
|
||||
}});
|
||||
|
||||
console.log($.closeModal);
|
||||
|
||||
/* rebind events */
|
||||
if(!setting) return;
|
||||
$ajaxModal = $('#ajaxModal');
|
||||
if(setting.afterShow && $.isFunction(setting.afterShow)) $ajaxModal.on('show.bs.modal', setting.afterShow);
|
||||
if(setting.afterShown && $.isFunction(setting.afterShown)) $ajaxModal.on('shown.bs.modal', setting.afterShown);
|
||||
if(setting.afterHide && $.isFunction(setting.afterHide)) $ajaxModal.on('hide.bs.modal', setting.afterHide);
|
||||
@@ -909,6 +926,54 @@ function setModal()
|
||||
$('[data-toggle=modal], a.iframe').modalTrigger();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set modal for list page.
|
||||
*
|
||||
* Open operation pages in modal for list pages, after the modal window close, reload the list content and repace the replaceID.
|
||||
*
|
||||
* @param string colorboxClass the class for colorbox binding.
|
||||
* @param string replaceID the html object to be replaced.
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setModal4List(colorboxClass, replaceID, callback, width, height)
|
||||
{
|
||||
if(typeof(width) == 'undefined') width = 900
|
||||
if(typeof(height) == 'undefined') height = 500
|
||||
$('.' + colorboxClass).modalTrigger(
|
||||
{
|
||||
width: width,
|
||||
// height: height,
|
||||
type: 'iframe',
|
||||
|
||||
afterHide:function()
|
||||
{
|
||||
var selfClose = $.cookie('selfClose');
|
||||
if(selfClose != 1) return;
|
||||
saveWindowSize();
|
||||
|
||||
var link = self.location.href;
|
||||
$('#' + replaceID).wrap("<div id='tmpDiv'></div>");
|
||||
$('#tmpDiv').load(link + ' #' + replaceID, function()
|
||||
{
|
||||
$('#tmpDiv').replaceWith($('#tmpDiv').html());
|
||||
setModal4List(colorboxClass, replaceID, callback, width, height);
|
||||
|
||||
try{$('.colored').colorize();}catch(err){}
|
||||
$('tfoot td').css('background', 'white').unbind('click').unbind('hover');
|
||||
try
|
||||
{
|
||||
$(".date").datePicker({createButton:true, startDate:startDate})
|
||||
.dpSetPosition($.dpConst.POS_TOP, $.dpConst.POS_RIGHT)
|
||||
}
|
||||
catch(err){}
|
||||
if(typeof(callback) == 'function') callback();
|
||||
$.cookie('selfClose', 0);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set table behavior
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user