* change loadColorbox to setModal4List for the function name.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
$(function()
|
||||
{
|
||||
loadColorbox('iframe', 'bugList');
|
||||
setModal4List('iframe', 'bugList');
|
||||
|
||||
if(typeof page == 'undefined') page = '';
|
||||
if(page == 'create')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
function loadColorbox(colorboxClass, replaceID)
|
||||
function setModal4List(colorboxClass, replaceID)
|
||||
{
|
||||
$('.iframe').colorbox({width:900, height:500, iframe:true, transition:'none', onCleanup:function(){parent.location.href=parent.location.href;}})
|
||||
}
|
||||
|
||||
@@ -25,5 +25,5 @@ function changeAction(formName, actionName, actionLink)
|
||||
$(function()
|
||||
{
|
||||
if(browseType == 'bysearch') ajaxGetSearchForm();
|
||||
loadColorbox('iframe', 'storyList');
|
||||
setModal4List('iframe', 'storyList');
|
||||
})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
function loadColorbox(colorboxClass, replaceID)
|
||||
function setModal4List(colorboxClass, replaceID)
|
||||
{
|
||||
replaceID = 'bugList';
|
||||
$('.' + colorboxClass).colorbox(
|
||||
@@ -7,14 +7,17 @@ function loadColorbox(colorboxClass, replaceID)
|
||||
height:500,
|
||||
iframe:true,
|
||||
transition:'none',
|
||||
|
||||
onCleanup:function()
|
||||
{
|
||||
saveWindowSize();
|
||||
|
||||
var link = self.location.href;
|
||||
$.get(link, {onlybody: "yes"}, function(data)
|
||||
{
|
||||
$('#' + replaceID).replaceWith(data)
|
||||
loadColorbox(colorboxClass, replaceID)
|
||||
setModal4List(colorboxClass, replaceID)
|
||||
|
||||
$('.colored').colorize();
|
||||
$('tfoot td').css('background', 'white').unbind('click').unbind('hover');
|
||||
});
|
||||
|
||||
@@ -95,7 +95,7 @@ function computeEndDate(delta)
|
||||
/* Auto compute the work days. */
|
||||
$(function()
|
||||
{
|
||||
loadColorbox('iframe', 'taskList');
|
||||
setModal4List('iframe', 'taskList');
|
||||
$(".date").bind('dateSelected', function()
|
||||
{
|
||||
computeWorkDays();
|
||||
|
||||
@@ -27,7 +27,7 @@ function changeAction(url)
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
loadColorbox('runCase', 'caseList');
|
||||
setModal4List('runCase', 'caseList');
|
||||
$('#' + browseType + 'Tab').addClass('active');
|
||||
$('#module' + moduleID).addClass('active');
|
||||
if(browseType == 'bysearch') ajaxGetSearchForm();
|
||||
|
||||
@@ -829,32 +829,39 @@ function selectItem(SelectID)
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Colorbox for List.
|
||||
* 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 loadColorbox(colorboxClass, replaceID)
|
||||
function setModal4List(colorboxClass, replaceID)
|
||||
{
|
||||
$('.' + colorboxClass).colorbox(
|
||||
{
|
||||
width: 900,
|
||||
height: 500,
|
||||
iframe: true,
|
||||
transition: 'none',
|
||||
|
||||
onCleanup:function()
|
||||
{
|
||||
width:900,
|
||||
height:500,
|
||||
iframe:true,
|
||||
transition:'none',
|
||||
onCleanup:function()
|
||||
saveWindowSize();
|
||||
|
||||
var link = self.location.href;
|
||||
$.get(link, {onlybody:"yes"}, function(data)
|
||||
{
|
||||
saveWindowSize();
|
||||
var link = self.location.href;
|
||||
$.get(link, {onlybody:"yes"}, function(data)
|
||||
{
|
||||
$('#' + replaceID).replaceWith(data)
|
||||
loadColorbox(colorboxClass, replaceID)
|
||||
$('.colored').colorize();
|
||||
$('tfoot td').css('background', 'white').unbind('click').unbind('hover');
|
||||
});
|
||||
}
|
||||
});
|
||||
$('#' + replaceID).replaceWith(data);
|
||||
setModal4List(colorboxClass, replaceID);
|
||||
|
||||
$('.colored').colorize();
|
||||
$('tfoot td').css('background', 'white').unbind('click').unbind('hover');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* Ping the server every some minutes to keep the session. */
|
||||
|
||||
Reference in New Issue
Block a user