fix whitespaces (tabs) in javascript
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,14 @@
|
|||||||
function download(id, name){
|
function download(id, name){
|
||||||
//alert(id +" "+ name);
|
//alert(id +" "+ name);
|
||||||
$.getJSON(
|
$.getJSON(
|
||||||
'archive.cgi?get_link='+name,
|
'archive.cgi?get_link='+name,
|
||||||
function(data){
|
function(data){
|
||||||
//alert(data);
|
//alert(data);
|
||||||
$.each(data,
|
$.each(data,
|
||||||
function(key, val) {
|
function(key, val) {
|
||||||
$('#'+id).html(val);
|
$('#'+id).html(val);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ function isChecked(selector){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cancel_edit_event(){
|
function cancel_edit_event(){
|
||||||
$('#calendar').show(effect,null,effect_duration);
|
$('#calendar').show(effect,null,effect_duration);
|
||||||
$('#calendar_weekdays').show(effect,null,effect_duration);
|
$('#calendar_weekdays').show(effect,null,effect_duration);
|
||||||
$('#event_editor').hide(effect,null,effect_duration);
|
$('#event_editor').hide(effect,null,effect_duration);
|
||||||
resizeCalendarMenu();
|
resizeCalendarMenu();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupMenuHeight(){
|
function setupMenuHeight(){
|
||||||
@@ -91,22 +91,22 @@ function resizeCalendarMenu(){
|
|||||||
//after getting menu heigth, hide calendar again
|
//after getting menu heigth, hide calendar again
|
||||||
var menuHeight=setupMenuHeight();
|
var menuHeight=setupMenuHeight();
|
||||||
|
|
||||||
var width= $(window).width()-0;
|
var width= $(window).width()-0;
|
||||||
var height= $(window).height()-menuHeight;
|
var height= $(window).height()-menuHeight;
|
||||||
|
|
||||||
if($('#calendar').css('display')=='none'){
|
if($('#calendar').css('display')=='none'){
|
||||||
$('body #content').css('max-width', '960');
|
$('body #content').css('max-width', '960');
|
||||||
}else{
|
}else{
|
||||||
$('body #content').css('max-width', width);
|
$('body #content').css('max-width', width);
|
||||||
}
|
}
|
||||||
$('div#calendar').css('width', width);
|
$('div#calendar').css('width', width);
|
||||||
$('div#calendar_weekdays').css('width', width);
|
$('div#calendar_weekdays').css('width', width);
|
||||||
$('div#calendar').css('height', height);
|
$('div#calendar').css('height', height);
|
||||||
|
|
||||||
// remove border for scroll
|
// remove border for scroll
|
||||||
$('#calendar table').css('width', width-20);
|
$('#calendar table').css('width', width-20);
|
||||||
$('#calendar_weekdays table').css('width', width-20);
|
$('#calendar_weekdays table').css('width', width-20);
|
||||||
$('#calendar table').css('height', height);
|
$('#calendar table').css('height', height);
|
||||||
|
|
||||||
//set spacing between table columns
|
//set spacing between table columns
|
||||||
var columnSpacing=Math.round($(window).width()/72);
|
var columnSpacing=Math.round($(window).width()/72);
|
||||||
@@ -118,30 +118,30 @@ function resizeCalendarMenu(){
|
|||||||
$('div.week').css('margin-left',-columnSpacing);
|
$('div.week').css('margin-left',-columnSpacing);
|
||||||
|
|
||||||
//calculate cell-width
|
//calculate cell-width
|
||||||
var cell_width=(width-100)/(days-1);
|
var cell_width=(width-100)/(days-1);
|
||||||
if($(window).width()<720){
|
if($(window).width()<720){
|
||||||
$('#calendar td.week').hide();
|
$('#calendar td.week').hide();
|
||||||
cell_width=(width-100)/(days)-4;
|
cell_width=(width-100)/(days)-4;
|
||||||
//$('#calendar div.text').css('padding-right','0');
|
//$('#calendar div.text').css('padding-right','0');
|
||||||
}else{
|
}else{
|
||||||
$('#calendar td.week').show();
|
$('#calendar td.week').show();
|
||||||
cell_width=(width-100)/(days)-columnSpacing;
|
cell_width=(width-100)/(days)-columnSpacing;
|
||||||
//$('#calendar div.text').css('padding-right','16px');
|
//$('#calendar div.text').css('padding-right','16px');
|
||||||
}
|
}
|
||||||
|
|
||||||
var with_param='width';
|
var with_param='width';
|
||||||
var cw=cell_width.toFixed();
|
var cw=cell_width.toFixed();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$('#calendar div.work').css(with_param, cw);
|
$('#calendar div.work').css(with_param, cw);
|
||||||
$('#calendar div.play').css(with_param, cw);
|
$('#calendar div.play').css(with_param, cw);
|
||||||
$('#calendar div.grid').css(with_param, cw);
|
$('#calendar div.grid').css(with_param, cw);
|
||||||
$('#calendar div.event').css(with_param, cw);
|
$('#calendar div.event').css(with_param, cw);
|
||||||
$('#calendar div.schedule').css(with_param, cw);
|
$('#calendar div.schedule').css(with_param, cw);
|
||||||
$('#calendar div.date').css(with_param, cw);
|
$('#calendar div.date').css(with_param, cw);
|
||||||
$('#calendar_weekdays div.date').css(with_param, cw);
|
$('#calendar_weekdays div.date').css(with_param, cw);
|
||||||
$('#calendar div.time').css(with_param, cw);
|
$('#calendar div.time').css(with_param, cw);
|
||||||
$('#calendar_weekdays div.time').css(with_param, cw);
|
$('#calendar_weekdays div.time').css(with_param, cw);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//now
|
//now
|
||||||
@@ -149,12 +149,12 @@ function resizeCalendarMenu(){
|
|||||||
|
|
||||||
//collisions
|
//collisions
|
||||||
/*
|
/*
|
||||||
$('#calendar div.event.error').css( with_param, cw/2.2);
|
$('#calendar div.event.error').css( with_param, cw/2.2);
|
||||||
$('#calendar div.schedule.error').css(with_param, cw/2.2);
|
$('#calendar div.schedule.error').css(with_param, cw/2.2);
|
||||||
|
|
||||||
//shift right
|
//shift right
|
||||||
$('#calendar div.event.error.x2').css( 'margin-left', cw/2+6);
|
$('#calendar div.event.error.x2').css( 'margin-left', cw/2+6);
|
||||||
$('#calendar div.schedule.error.x2').css('margin-left', cw/2+6);
|
$('#calendar div.schedule.error.x2').css('margin-left', cw/2+6);
|
||||||
*/
|
*/
|
||||||
showCalendar();
|
showCalendar();
|
||||||
}
|
}
|
||||||
@@ -505,7 +505,7 @@ function getUrl(name,value){
|
|||||||
function reloadCalendar(){
|
function reloadCalendar(){
|
||||||
var url=window.location.href;
|
var url=window.location.href;
|
||||||
url=updateUrlParameters(url);
|
url=updateUrlParameters(url);
|
||||||
loadCalendar(url);
|
loadCalendar(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
function initTodayButton(){
|
function initTodayButton(){
|
||||||
@@ -601,8 +601,8 @@ function initRmsPlot(){
|
|||||||
var id = $(this).attr("id");
|
var id = $(this).attr("id");
|
||||||
var field = id.split('_');
|
var field = id.split('_');
|
||||||
var classname = field.shift();
|
var classname = field.shift();
|
||||||
var project_id = field.shift();
|
var project_id = field.shift();
|
||||||
var studio_id = field.shift();
|
var studio_id = field.shift();
|
||||||
var start = $(this).attr("start")
|
var start = $(this).attr("start")
|
||||||
|
|
||||||
if (project_id==null) return;
|
if (project_id==null) return;
|
||||||
@@ -671,14 +671,14 @@ function loadCalendar(url, mouseButton){
|
|||||||
url=updateUrlParameters(url);
|
url=updateUrlParameters(url);
|
||||||
}
|
}
|
||||||
url=setUrlParameter(url, 'part', '1');
|
url=setUrlParameter(url, 'part', '1');
|
||||||
updateContainer('calendarTable', url, function(){
|
updateContainer('calendarTable', url, function(){
|
||||||
updateTable();
|
updateTable();
|
||||||
$('#calendarTable').css('opacity','1.0');
|
$('#calendarTable').css('opacity','1.0');
|
||||||
$('#current_date').html(current_date);
|
$('#current_date').html(current_date);
|
||||||
updateUrls(url);
|
updateUrls(url);
|
||||||
initRmsPlot();
|
initRmsPlot();
|
||||||
adjustColors();
|
adjustColors();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateTable(){
|
function updateTable(){
|
||||||
@@ -712,10 +712,10 @@ function updateTable(){
|
|||||||
|
|
||||||
//$('body').css('background','#eee');
|
//$('body').css('background','#eee');
|
||||||
|
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
resizeCalendarMenu();
|
resizeCalendarMenu();
|
||||||
setupMenu()
|
setupMenu()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
show_schedule();
|
show_schedule();
|
||||||
@@ -767,8 +767,8 @@ function updateTable(){
|
|||||||
//disable context menu
|
//disable context menu
|
||||||
document.oncontextmenu = function() {return false;};
|
document.oncontextmenu = function() {return false;};
|
||||||
|
|
||||||
//edit existing event
|
//edit existing event
|
||||||
$(baseElement).off();
|
$(baseElement).off();
|
||||||
$(baseElement).on("mousedown", ".event", function(event){
|
$(baseElement).on("mousedown", ".event", function(event){
|
||||||
handleEvent($(this).attr("id"), event);
|
handleEvent($(this).attr("id"), event);
|
||||||
});
|
});
|
||||||
@@ -836,16 +836,16 @@ function updateTable(){
|
|||||||
// get first event_list item
|
// get first event_list item
|
||||||
var id = $('#event_list tbody tr').first().attr('id');
|
var id = $('#event_list tbody tr').first().attr('id');
|
||||||
//console.log(id);
|
//console.log(id);
|
||||||
var field=id.split('_');
|
var field=id.split('_');
|
||||||
var classname =field.shift();
|
var classname =field.shift();
|
||||||
var project_id =field.shift();
|
var project_id =field.shift();
|
||||||
var studio_id =field.shift();
|
var studio_id =field.shift();
|
||||||
var series_id =field.shift();
|
var series_id =field.shift();
|
||||||
var url='series.cgi';
|
var url='series.cgi';
|
||||||
url+='?project_id='+project_id;
|
url+='?project_id='+project_id;
|
||||||
url+='&studio_id='+studio_id;
|
url+='&studio_id='+studio_id;
|
||||||
url+='&series_id='+series_id;
|
url+='&series_id='+series_id;
|
||||||
url+='&action=show';
|
url+='&action=show';
|
||||||
load(url);
|
load(url);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -927,22 +927,22 @@ function collision(div1, div2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleEvent(id, event){
|
function handleEvent(id, event){
|
||||||
var field=id.split('_');
|
var field=id.split('_');
|
||||||
var classname =field.shift();
|
var classname =field.shift();
|
||||||
var project_id =field.shift();
|
var project_id =field.shift();
|
||||||
var studio_id =field.shift();
|
var studio_id =field.shift();
|
||||||
var series_id =field.shift();
|
var series_id =field.shift();
|
||||||
var event_id =field.shift();
|
var event_id =field.shift();
|
||||||
|
|
||||||
//if(checkStudio()==0)return;
|
//if(checkStudio()==0)return;
|
||||||
if (project_id<0) {alert("please select a project");return;}
|
if (project_id<0) {alert("please select a project");return;}
|
||||||
if (studio_id <0) {alert("please select a studio");return;}
|
if (studio_id <0) {alert("please select a studio");return;}
|
||||||
if (series_id <0) return;
|
if (series_id <0) return;
|
||||||
if (event_id <0) return;
|
if (event_id <0) return;
|
||||||
|
|
||||||
var url="event.cgi?action=edit&project_id="+project_id+"&studio_id="+studio_id+"&series_id="+series_id+"&event_id="+event_id;
|
var url="event.cgi?action=edit&project_id="+project_id+"&studio_id="+studio_id+"&series_id="+series_id+"&event_id="+event_id;
|
||||||
if(event.which==1){
|
if(event.which==1){
|
||||||
load(url);
|
load(url);
|
||||||
}
|
}
|
||||||
if(event.which==2){
|
if(event.which==2){
|
||||||
openNewTab(url);
|
openNewTab(url);
|
||||||
@@ -950,17 +950,17 @@ function handleEvent(id, event){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleUnassignedEvent(id){
|
function handleUnassignedEvent(id){
|
||||||
var field=id.split('_');
|
var field=id.split('_');
|
||||||
var classname =field.shift();
|
var classname =field.shift();
|
||||||
var project_id =field.shift();
|
var project_id =field.shift();
|
||||||
var studio_id =field.shift();
|
var studio_id =field.shift();
|
||||||
var series_id =field.shift();
|
var series_id =field.shift();
|
||||||
var event_id =field.shift();
|
var event_id =field.shift();
|
||||||
|
|
||||||
if(checkStudio()==0)return;
|
if(checkStudio()==0)return;
|
||||||
if (project_id<0) return;
|
if (project_id<0) return;
|
||||||
if (studio_id<0) return;
|
if (studio_id<0) return;
|
||||||
if (event_id<0) return;
|
if (event_id<0) return;
|
||||||
//console.log("assign series")
|
//console.log("assign series")
|
||||||
$('#assign_series_events input[name="event_id"]').attr('value',event_id);
|
$('#assign_series_events input[name="event_id"]').attr('value',event_id);
|
||||||
|
|
||||||
@@ -970,9 +970,9 @@ function handleUnassignedEvent(id){
|
|||||||
function handleSchedule(id, start_date, event){
|
function handleSchedule(id, start_date, event){
|
||||||
var field=id.split('_');
|
var field=id.split('_');
|
||||||
var classname =field.shift();
|
var classname =field.shift();
|
||||||
var project_id =field.shift();
|
var project_id =field.shift();
|
||||||
var studio_id =field.shift();
|
var studio_id =field.shift();
|
||||||
var series_id =field.shift();
|
var series_id =field.shift();
|
||||||
|
|
||||||
if(checkStudio()==0)return;
|
if(checkStudio()==0)return;
|
||||||
if (project_id<0) return;
|
if (project_id<0) return;
|
||||||
@@ -980,7 +980,7 @@ function handleSchedule(id, start_date, event){
|
|||||||
if (series_id<0) return;
|
if (series_id<0) return;
|
||||||
|
|
||||||
if(event.which==1){
|
if(event.which==1){
|
||||||
//left click: create event from schedule
|
//left click: create event from schedule
|
||||||
var url="event.cgi?action=show_new_event_from_schedule&project_id="+project_id+"&studio_id="+studio_id+"&series_id="+series_id+"&start_date="+start_date;
|
var url="event.cgi?action=show_new_event_from_schedule&project_id="+project_id+"&studio_id="+studio_id+"&series_id="+series_id+"&start_date="+start_date;
|
||||||
load(url);
|
load(url);
|
||||||
}
|
}
|
||||||
@@ -992,17 +992,17 @@ function handleSchedule(id, start_date, event){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleGrid(id){
|
function handleGrid(id){
|
||||||
var field=id.split('_');
|
var field=id.split('_');
|
||||||
var classname =field.shift();
|
var classname =field.shift();
|
||||||
var project_id =field.shift();
|
var project_id =field.shift();
|
||||||
var studio_id =field.shift();
|
var studio_id =field.shift();
|
||||||
var series_id =field.shift();//to be selected
|
var series_id =field.shift();//to be selected
|
||||||
|
|
||||||
if(checkStudio()==0)return;
|
if(checkStudio()==0)return;
|
||||||
if (project_id<0) return;
|
if (project_id<0) return;
|
||||||
if (studio_id<0) return;
|
if (studio_id<0) return;
|
||||||
|
|
||||||
var start_date=getNearestDatetime();
|
var start_date=getNearestDatetime();
|
||||||
$('#series_date').attr('value',start_date);
|
$('#series_date').attr('value',start_date);
|
||||||
showDateTimePicker('#series_date');
|
showDateTimePicker('#series_date');
|
||||||
//alert("studio "+studio_id+" "+start_date);
|
//alert("studio "+studio_id+" "+start_date);
|
||||||
@@ -1013,9 +1013,9 @@ function handleGrid(id){
|
|||||||
function handleWorktime(id, event){
|
function handleWorktime(id, event){
|
||||||
var field=id.split('_');
|
var field=id.split('_');
|
||||||
var classname =field.shift();
|
var classname =field.shift();
|
||||||
var project_id =field.shift();
|
var project_id =field.shift();
|
||||||
var studio_id =field.shift();
|
var studio_id =field.shift();
|
||||||
var schedule_id =field.shift();
|
var schedule_id =field.shift();
|
||||||
|
|
||||||
if(checkStudio()==0)return;
|
if(checkStudio()==0)return;
|
||||||
if (project_id<0) return;
|
if (project_id<0) return;
|
||||||
@@ -1054,7 +1054,6 @@ function adjustColors(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
// $('#calendar').hide();
|
|
||||||
initCalendarMenu();
|
initCalendarMenu();
|
||||||
|
|
||||||
if(calendarTable==1){
|
if(calendarTable==1){
|
||||||
|
|||||||
@@ -11,64 +11,64 @@ function getController(){
|
|||||||
|
|
||||||
|
|
||||||
function set_studio(id){
|
function set_studio(id){
|
||||||
var url=window.location.href;
|
var url=window.location.href;
|
||||||
//split by #
|
//split by #
|
||||||
var comment= url.split(/\#/);
|
var comment= url.split(/\#/);
|
||||||
url=comment.shift();
|
url=comment.shift();
|
||||||
comment=comment.join('#');
|
comment=comment.join('#');
|
||||||
//split by ?
|
//split by ?
|
||||||
var parts= url.split(/\?/);
|
var parts= url.split(/\?/);
|
||||||
url=parts.shift();
|
url=parts.shift();
|
||||||
//split by &
|
//split by &
|
||||||
parts=parts.join('?').split(/\&+/);
|
parts=parts.join('?').split(/\&+/);
|
||||||
var params=[];
|
var params=[];
|
||||||
if (parts.length>0){
|
if (parts.length>0){
|
||||||
for (index in parts){
|
for (index in parts){
|
||||||
//add all name value pairs but studio id
|
//add all name value pairs but studio id
|
||||||
var pair=parts[index];
|
var pair=parts[index];
|
||||||
if(! pair.match(/^studio_id=/)) params.push(pair);
|
if(! pair.match(/^studio_id=/)) params.push(pair);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//add studio id
|
//add studio id
|
||||||
if(id==null)id=-1;
|
if(id==null)id=-1;
|
||||||
if(id=='')id=-1;
|
if(id=='')id=-1;
|
||||||
params.push('studio_id='+id);
|
params.push('studio_id='+id);
|
||||||
//append parameters to url
|
//append parameters to url
|
||||||
url+='?'+params.join('&');
|
url+='?'+params.join('&');
|
||||||
if ((comment!=null)&&(comment!='')) url+='#'+comment;
|
if ((comment!=null)&&(comment!='')) url+='#'+comment;
|
||||||
window.location.href=url;
|
window.location.href=url;
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_project(id){
|
function set_project(id){
|
||||||
var url=window.location.href;
|
var url=window.location.href;
|
||||||
//split by #
|
//split by #
|
||||||
var comment= url.split(/\#/);
|
var comment= url.split(/\#/);
|
||||||
url=comment.shift();
|
url=comment.shift();
|
||||||
comment=comment.join('#');
|
comment=comment.join('#');
|
||||||
//split by ?
|
//split by ?
|
||||||
var parts= url.split(/\?/);
|
var parts= url.split(/\?/);
|
||||||
url=parts.shift();
|
url=parts.shift();
|
||||||
//split by &
|
//split by &
|
||||||
parts=parts.join('?').split(/\&+/);
|
parts=parts.join('?').split(/\&+/);
|
||||||
var params=[];
|
var params=[];
|
||||||
if (parts.length>0){
|
if (parts.length>0){
|
||||||
for (index in parts){
|
for (index in parts){
|
||||||
//add all name value pairs but project id
|
//add all name value pairs but project id
|
||||||
var pair=parts[index];
|
var pair=parts[index];
|
||||||
if(
|
if(
|
||||||
(! pair.match(/^project_id=/))
|
(! pair.match(/^project_id=/))
|
||||||
&& (! pair.match(/^studio_id=/))
|
&& (! pair.match(/^studio_id=/))
|
||||||
)params.push(pair);
|
)params.push(pair);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//add project id
|
//add project id
|
||||||
if(id==null)id=-1;
|
if(id==null)id=-1;
|
||||||
if(id=='')id=-1;
|
if(id=='')id=-1;
|
||||||
params.push('project_id='+id);
|
params.push('project_id='+id);
|
||||||
//append parameters to url
|
//append parameters to url
|
||||||
url+='?'+params.join('&');
|
url+='?'+params.join('&');
|
||||||
if ((comment!=null)&&(comment!='')) url+='#'+comment;
|
if ((comment!=null)&&(comment!='')) url+='#'+comment;
|
||||||
window.location.href=url;
|
window.location.href=url;
|
||||||
}
|
}
|
||||||
|
|
||||||
function contains(s,t){
|
function contains(s,t){
|
||||||
@@ -78,23 +78,23 @@ function contains(s,t){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateContainer(id, url, callback){
|
function updateContainer(id, url, callback){
|
||||||
//alert(id+":"+url);
|
//alert(id+":"+url);
|
||||||
if (id==null) return;
|
if (id==null) return;
|
||||||
if ($("#"+id).length==0) return;
|
if ($("#"+id).length==0) return;
|
||||||
$("#"+id).load(url, callback);
|
$("#"+id).load(url, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
function load(url){
|
function load(url){
|
||||||
window.location=url;
|
window.location=url;
|
||||||
//window.location.replace(url);
|
//window.location.replace(url);
|
||||||
//document.location.href=url;
|
//document.location.href=url;
|
||||||
//$(window).load(url);
|
//$(window).load(url);
|
||||||
//$('html').load(url);
|
//$('html').load(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function postContainer(url, parameters, callback){
|
function postContainer(url, parameters, callback){
|
||||||
if (url!='') $.post(url, parameters, callback);
|
if (url!='') $.post(url, parameters, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
// init getTextWidth
|
// init getTextWidth
|
||||||
@@ -359,10 +359,10 @@ $(document).ready(
|
|||||||
// will be done implicitely on adding back button
|
// will be done implicitely on adding back button
|
||||||
//setupMenuHeight();
|
//setupMenuHeight();
|
||||||
|
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
setupMenuHeight();
|
setupMenuHeight();
|
||||||
setupMenu();
|
setupMenu();
|
||||||
});
|
});
|
||||||
|
|
||||||
if(getController()=='calendar'){
|
if(getController()=='calendar'){
|
||||||
//use build-in localization
|
//use build-in localization
|
||||||
|
|||||||
@@ -180,9 +180,9 @@ function changeSeries(seriesId){
|
|||||||
url += '&action=reassign_event';
|
url += '&action=reassign_event';
|
||||||
//alert(url);
|
//alert(url);
|
||||||
|
|
||||||
$.post(
|
$.post(
|
||||||
url,
|
url,
|
||||||
function(data){
|
function(data){
|
||||||
var url='event.cgi?';
|
var url='event.cgi?';
|
||||||
url += '&project_id='+projectId;
|
url += '&project_id='+projectId;
|
||||||
url += '&studio_id='+studioId;
|
url += '&studio_id='+studioId;
|
||||||
@@ -190,9 +190,9 @@ function changeSeries(seriesId){
|
|||||||
url += '&event_id='+eventId;
|
url += '&event_id='+eventId;
|
||||||
url += '&action=edit';
|
url += '&action=edit';
|
||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// hide change series on abort
|
// hide change series on abort
|
||||||
@@ -237,8 +237,8 @@ function updateCheckBox(selector, value){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function checkExcerptField(){
|
function checkExcerptField(){
|
||||||
var elem=$('textarea[name="excerpt"]');
|
var elem=$('textarea[name="excerpt"]');
|
||||||
if (elem.length==0) return 0;
|
if (elem.length==0) return 0;
|
||||||
var length = elem.val().length;
|
var length = elem.val().length;
|
||||||
console.log("length="+length);
|
console.log("length="+length);
|
||||||
if (length > 250){
|
if (length > 250){
|
||||||
@@ -246,12 +246,12 @@ function checkExcerptField(){
|
|||||||
}else{
|
}else{
|
||||||
$('#excerpt_too_long').hide();
|
$('#excerpt_too_long').hide();
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkExcerptExtensionField(){
|
function checkExcerptExtensionField(){
|
||||||
var elem=$('textarea[name="user_excerpt"]');
|
var elem=$('textarea[name="user_excerpt"]');
|
||||||
if (elem.length==0) return 0;
|
if (elem.length==0) return 0;
|
||||||
var length = elem.val().length;
|
var length = elem.val().length;
|
||||||
console.log("length="+length);
|
console.log("length="+length);
|
||||||
if (length > 250){
|
if (length > 250){
|
||||||
@@ -259,21 +259,21 @@ function checkExcerptExtensionField(){
|
|||||||
}else{
|
}else{
|
||||||
$('#excerpt_extension_too_long').hide();
|
$('#excerpt_extension_too_long').hide();
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkFields(){
|
function checkFields(){
|
||||||
if (checkExcerptField()){
|
if (checkExcerptField()){
|
||||||
$('textarea[name="excerpt"]').on("keyup", function(){
|
$('textarea[name="excerpt"]').on("keyup", function(){
|
||||||
checkExcerptField();
|
checkExcerptField();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (checkExcerptExtensionField()){
|
if (checkExcerptExtensionField()){
|
||||||
$('textarea[name="user_excerpt"]').on("keyup", function(){
|
$('textarea[name="user_excerpt"]').on("keyup", function(){
|
||||||
checkExcerptExtensionField();
|
checkExcerptExtensionField();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(
|
$(document).ready(
|
||||||
@@ -281,15 +281,15 @@ $(document).ready(
|
|||||||
initRegions(region);
|
initRegions(region);
|
||||||
showDateTimePicker('#start_date');
|
showDateTimePicker('#start_date');
|
||||||
|
|
||||||
$('input[type="checkbox"]').click(
|
$('input[type="checkbox"]').click(
|
||||||
function(){
|
function(){
|
||||||
if ($(this).attr('value')=='1'){
|
if ($(this).attr('value')=='1'){
|
||||||
$(this).attr('value','0');
|
$(this).attr('value','0');
|
||||||
}else{
|
}else{
|
||||||
$(this).attr('value','1');
|
$(this).attr('value','1');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if($('#calendar').length==0){
|
if($('#calendar').length==0){
|
||||||
$('#back_to_calendar').hide();
|
$('#back_to_calendar').hide();
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
show a series, its template, users and events
|
show a series, its template, users and events
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// set checkbox values checked depending on value
|
// set checkbox values checked depending on value
|
||||||
function initCheckBoxes(){
|
function initCheckBoxes(){
|
||||||
$('div.editor input[type="checkbox"]').each(
|
$('div.editor input[type="checkbox"]').each(
|
||||||
function () {
|
function () {
|
||||||
if ($(this).attr('value')=='1'){
|
if ($(this).attr('value')=='1'){
|
||||||
$(this).attr('value','1');
|
$(this).attr('value','1');
|
||||||
@@ -14,26 +14,26 @@ function initCheckBoxes(){
|
|||||||
$(this).attr('value','0');
|
$(this).attr('value','0');
|
||||||
$(this).attr('checked',null);
|
$(this).attr('checked',null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add checkbox handler to change value on click
|
// add checkbox handler to change value on click
|
||||||
function addCheckBoxHandler(){
|
function addCheckBoxHandler(){
|
||||||
$('div.editor input[type="checkbox"]').click(
|
$('div.editor input[type="checkbox"]').click(
|
||||||
function () {
|
function () {
|
||||||
if ($(this).attr('value')=='1'){
|
if ($(this).attr('value')=='1'){
|
||||||
$(this).attr('value','0');
|
$(this).attr('value','0');
|
||||||
}else{
|
}else{
|
||||||
$(this).attr('value','1');
|
$(this).attr('value','1');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// show/hide series member edit
|
// show/hide series member edit
|
||||||
function edit_series_members(series_id){
|
function edit_series_members(series_id){
|
||||||
$('.edit_series_members_'+series_id).toggle();
|
$('.edit_series_members_'+series_id).toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
// show/hide schedule fields depending on period type for a given schedule element
|
// show/hide schedule fields depending on period type for a given schedule element
|
||||||
@@ -226,7 +226,7 @@ function checkFields(){
|
|||||||
|
|
||||||
|
|
||||||
$(document).ready(
|
$(document).ready(
|
||||||
function(){
|
function(){
|
||||||
setupLocalization(
|
setupLocalization(
|
||||||
function(){
|
function(){
|
||||||
addBackButton();
|
addBackButton();
|
||||||
@@ -245,8 +245,8 @@ $(document).ready(
|
|||||||
initCheckBoxes();
|
initCheckBoxes();
|
||||||
addCheckBoxHandler();
|
addCheckBoxHandler();
|
||||||
|
|
||||||
$("#tabs").tabs();
|
$("#tabs").tabs();
|
||||||
$('#tabs').removeClass('ui-widget ui-widget-content ui-corner-all');
|
$('#tabs').removeClass('ui-widget ui-widget-content ui-corner-all');
|
||||||
|
|
||||||
updateScheduleButtonName();
|
updateScheduleButtonName();
|
||||||
initScheduleFields();
|
initScheduleFields();
|
||||||
@@ -270,7 +270,7 @@ $(document).ready(
|
|||||||
|
|
||||||
$('table#schedule_table').tablesorter({
|
$('table#schedule_table').tablesorter({
|
||||||
widgets: ["filter"],
|
widgets: ["filter"],
|
||||||
usNumberFormat : false
|
usNumberFormat : false
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
show a series, its template, users and events
|
show a series, its template, users and events
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// set checkbox values checked depending on value
|
// set checkbox values checked depending on value
|
||||||
function initCheckBoxes(){
|
function initCheckBoxes(){
|
||||||
$('div.editor input[type="checkbox"]').each(
|
$('div.editor input[type="checkbox"]').each(
|
||||||
function () {
|
function () {
|
||||||
if ($(this).attr('value')=='1'){
|
if ($(this).attr('value')=='1'){
|
||||||
$(this).attr('value','1');
|
$(this).attr('value','1');
|
||||||
@@ -14,20 +14,20 @@ function initCheckBoxes(){
|
|||||||
$(this).attr('value','0');
|
$(this).attr('value','0');
|
||||||
$(this).attr('checked',null);
|
$(this).attr('checked',null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add checkbox handler to change value on click
|
// add checkbox handler to change value on click
|
||||||
function addCheckBoxHandler(){
|
function addCheckBoxHandler(){
|
||||||
$('div.editor input[type="checkbox"]').click(
|
$('div.editor input[type="checkbox"]').click(
|
||||||
function () {
|
function () {
|
||||||
if ($(this).attr('value')=='1'){
|
if ($(this).attr('value')=='1'){
|
||||||
$(this).attr('value','0');
|
$(this).attr('value','0');
|
||||||
}else{
|
}else{
|
||||||
$(this).attr('value','1');
|
$(this).attr('value','1');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ function setInputWidth(){
|
|||||||
|
|
||||||
|
|
||||||
$(document).ready(
|
$(document).ready(
|
||||||
function(){
|
function(){
|
||||||
setupLocalization(
|
setupLocalization(
|
||||||
function(){
|
function(){
|
||||||
addBackButton();
|
addBackButton();
|
||||||
@@ -204,8 +204,8 @@ $(document).ready(
|
|||||||
initCheckBoxes();
|
initCheckBoxes();
|
||||||
addCheckBoxHandler();
|
addCheckBoxHandler();
|
||||||
|
|
||||||
$("#tabs").tabs();
|
$("#tabs").tabs();
|
||||||
$('#tabs').removeClass('ui-widget ui-widget-content ui-corner-all');
|
$('#tabs').removeClass('ui-widget ui-widget-content ui-corner-all');
|
||||||
|
|
||||||
updateScheduleButtonName();
|
updateScheduleButtonName();
|
||||||
initScheduleFields();
|
initScheduleFields();
|
||||||
@@ -224,7 +224,7 @@ $(document).ready(
|
|||||||
|
|
||||||
$('table#schedule_table').tablesorter({
|
$('table#schedule_table').tablesorter({
|
||||||
widgets: ["filter"],
|
widgets: ["filter"],
|
||||||
usNumberFormat : false
|
usNumberFormat : false
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
// TODO: add project_id
|
// TODO: add project_id
|
||||||
function edit_event(event_id, series_id, studio_id, project_id, hide_series){
|
function edit_event(event_id, series_id, studio_id, project_id, hide_series){
|
||||||
var elem=$('#event_'+event_id);
|
var elem=$('#event_'+event_id);
|
||||||
if(elem.hasClass('active')){
|
if(elem.hasClass('active')){
|
||||||
elem.removeClass('active');
|
elem.removeClass('active');
|
||||||
$('#event_container_'+event_id).slideToggle(
|
$('#event_container_'+event_id).slideToggle(
|
||||||
function(){
|
function(){
|
||||||
$('#event_details_'+event_id).html('');
|
$('#event_details_'+event_id).html('');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}else{
|
}else{
|
||||||
elem.addClass('active');
|
elem.addClass('active');
|
||||||
var url="event.cgi?project_id="+project_id+"&studio_id="+studio_id+"&series_id="+series_id+"&event_id="+event_id+"&action=edit";
|
var url="event.cgi?project_id="+project_id+"&studio_id="+studio_id+"&series_id="+series_id+"&event_id="+event_id+"&action=edit";
|
||||||
if ((hide_series!=null) && (hide_series!=''))url+='&hide_series=1';
|
if ((hide_series!=null) && (hide_series!=''))url+='&hide_series=1';
|
||||||
load(url);
|
load(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ function isNewToHistory(url){
|
|||||||
var historyController=history[0].split('.cgi').shift();
|
var historyController=history[0].split('.cgi').shift();
|
||||||
//remove last entry on same controller
|
//remove last entry on same controller
|
||||||
if(urlController==historyController){
|
if(urlController==historyController){
|
||||||
console.log("same controller\n"+url+"\n"+history[0])
|
console.log("same controller\n"+url+"\n"+history[0])
|
||||||
//var ignore=0;
|
//var ignore=0;
|
||||||
//provide back to series from series details
|
//provide back to series from series details
|
||||||
//if(contains(url,'series')){
|
//if(contains(url,'series')){
|
||||||
@@ -68,8 +68,8 @@ function isNewToHistory(url){
|
|||||||
//console.log(ignore);
|
//console.log(ignore);
|
||||||
//}
|
//}
|
||||||
//if (ignore==0)
|
//if (ignore==0)
|
||||||
//history.shift();
|
//history.shift();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ function updateActiveImage(){
|
|||||||
|
|
||||||
// open dialog to show or edit image properties
|
// open dialog to show or edit image properties
|
||||||
function updateImageEditor(elem, filename, target, project_id, studio_id, series_id, event_id, pid){
|
function updateImageEditor(elem, filename, target, project_id, studio_id, series_id, event_id, pid){
|
||||||
var url='image.cgi?show='+filename;
|
var url='image.cgi?show='+filename;
|
||||||
url += '&template=edit_image.html';
|
url += '&template=edit_image.html';
|
||||||
url += '&target=' + target;
|
url += '&target=' + target;
|
||||||
url += '&project_id='+project_id;
|
url += '&project_id='+project_id;
|
||||||
@@ -31,12 +31,12 @@ function updateImageEditor(elem, filename, target, project_id, studio_id, series
|
|||||||
|
|
||||||
console.log("updateImageEditor "+url);
|
console.log("updateImageEditor "+url);
|
||||||
|
|
||||||
$("#img_editor").load(
|
$("#img_editor").load(
|
||||||
url,
|
url,
|
||||||
function(){
|
function(){
|
||||||
setActiveImage(elem);
|
setActiveImage(elem);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// build search url and load
|
// build search url and load
|
||||||
@@ -80,11 +80,11 @@ function saveImage(id, filename) {
|
|||||||
$('#imageEditor #status').html('');
|
$('#imageEditor #status').html('');
|
||||||
console.log("save image "+id+" ");
|
console.log("save image "+id+" ");
|
||||||
|
|
||||||
var url='image.cgi?save_image='+filename+'&project_id='+project_id+'&studio_id='+studio_id;
|
var url='image.cgi?save_image='+filename+'&project_id='+project_id+'&studio_id='+studio_id;
|
||||||
$.post(
|
$.post(
|
||||||
url,
|
url,
|
||||||
$("#save_img_"+id).serialize(),
|
$("#save_img_"+id).serialize(),
|
||||||
function(data){
|
function(data){
|
||||||
var errorFound=0;
|
var errorFound=0;
|
||||||
data.split(/\n/).forEach(
|
data.split(/\n/).forEach(
|
||||||
function(line){
|
function(line){
|
||||||
@@ -102,10 +102,10 @@ function saveImage(id, filename) {
|
|||||||
$('#imageEditor #status').append('<div class="ok">saved</div>');
|
$('#imageEditor #status').append('<div class="ok">saved</div>');
|
||||||
updateActiveImage();
|
updateActiveImage();
|
||||||
}
|
}
|
||||||
hideImageDetails('img_'+id, filename);
|
hideImageDetails('img_'+id, filename);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete image
|
// delete image
|
||||||
@@ -120,20 +120,20 @@ function askDeleteImage(id, filename) {
|
|||||||
// delete image
|
// delete image
|
||||||
function deleteImage(id, filename) {
|
function deleteImage(id, filename) {
|
||||||
//alert("deleteImage");return;
|
//alert("deleteImage");return;
|
||||||
$("#"+id).load('image.cgi?delete_image='+filename+'&project_id='+project_id+'&studio_id='+studio_id);
|
$("#"+id).load('image.cgi?delete_image='+filename+'&project_id='+project_id+'&studio_id='+studio_id);
|
||||||
hideImageDetails('img_'+id, filename);
|
hideImageDetails('img_'+id, filename);
|
||||||
$("#"+id).hide('drop');
|
$("#"+id).hide('drop');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// close all open dialogs
|
// close all open dialogs
|
||||||
function hideImageDetails(id, filename){
|
function hideImageDetails(id, filename){
|
||||||
try{$('#img_editor').dialog('close');}catch(e){}
|
try{$('#img_editor').dialog('close');}catch(e){}
|
||||||
|
|
||||||
var url='image.cgi?show='+filename+'&template=image_single.html&project_id='+project_id+'&studio_id='+studio_id;
|
var url='image.cgi?show='+filename+'&template=image_single.html&project_id='+project_id+'&studio_id='+studio_id;
|
||||||
console.log("hideImageDetails, load url="+url)
|
console.log("hideImageDetails, load url="+url)
|
||||||
$("#"+id).load(url);
|
$("#"+id).load(url);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectImage( searchValue, imageUrl, target, project_id, studio_id, series_id, event_id, pid){
|
function selectImage( searchValue, imageUrl, target, project_id, studio_id, series_id, event_id, pid){
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
function add_series(){
|
function add_series(){
|
||||||
$('#edit_new').toggle();
|
$('#edit_new').toggle();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function view_series_details(series_id, studio_id, project_id){
|
function view_series_details(series_id, studio_id, project_id){
|
||||||
var elem=$('.series_details_'+series_id).prev();
|
var elem=$('.series_details_'+series_id).prev();
|
||||||
if(elem.hasClass('active')){
|
if(elem.hasClass('active')){
|
||||||
elem.removeClass('active');
|
elem.removeClass('active');
|
||||||
$('.series_details_'+series_id).slideToggle(
|
$('.series_details_'+series_id).slideToggle(
|
||||||
function(){
|
function(){
|
||||||
$('#series_details_'+series_id).html('');
|
$('#series_details_'+series_id).html('');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}else{
|
}else{
|
||||||
elem.addClass('active');
|
elem.addClass('active');
|
||||||
var url="series.cgi?project_id="+project_id+"&studio_id="+studio_id+"&series_id="+series_id+"&action=show";
|
var url="series.cgi?project_id="+project_id+"&studio_id="+studio_id+"&series_id="+series_id+"&action=show";
|
||||||
load(url);
|
load(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,39 +9,39 @@ function initRegions(region){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.datepicker.regional['de'] = {
|
$.datepicker.regional['de'] = {
|
||||||
closeText: 'Schließen',
|
closeText: 'Schließen',
|
||||||
prevText: '<Zurück',
|
prevText: '<Zurück',
|
||||||
nextText: 'Vor>',
|
nextText: 'Vor>',
|
||||||
currentText: 'Heute',
|
currentText: 'Heute',
|
||||||
monthNames: ['Januar','Februar','März','April','Mai','Juni',
|
monthNames: ['Januar','Februar','März','April','Mai','Juni',
|
||||||
'Juli','August','September','Oktober','November','Dezember'],
|
'Juli','August','September','Oktober','November','Dezember'],
|
||||||
monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
|
monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
|
||||||
'Jul','Aug','Sep','Okt','Nov','Dez'],
|
'Jul','Aug','Sep','Okt','Nov','Dez'],
|
||||||
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
|
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
|
||||||
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
||||||
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
||||||
weekHeader: 'KW',
|
weekHeader: 'KW',
|
||||||
dateFormat: 'dd.mm.yy',
|
dateFormat: 'dd.mm.yy',
|
||||||
firstDay: 1,
|
firstDay: 1,
|
||||||
isRTL: false,
|
isRTL: false,
|
||||||
showMonthAfterYear: false,
|
showMonthAfterYear: false,
|
||||||
yearSuffix: ''
|
yearSuffix: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
$.timepicker.regional['de'] = {
|
$.timepicker.regional['de'] = {
|
||||||
timeOnlyTitle: 'Zeit wählen',
|
timeOnlyTitle: 'Zeit wählen',
|
||||||
timeText: 'Zeit',
|
timeText: 'Zeit',
|
||||||
hourText: 'Stunde',
|
hourText: 'Stunde',
|
||||||
minuteText: 'Minute',
|
minuteText: 'Minute',
|
||||||
secondText: 'Sekunde',
|
secondText: 'Sekunde',
|
||||||
millisecText: 'Millisekunde',
|
millisecText: 'Millisekunde',
|
||||||
timezoneText: 'Zeitzone',
|
timezoneText: 'Zeitzone',
|
||||||
currentText: 'Jetzt',
|
currentText: 'Jetzt',
|
||||||
closeText: 'Schließen',
|
closeText: 'Schließen',
|
||||||
timeFormat: 'HH:mm',
|
timeFormat: 'HH:mm',
|
||||||
amNames: ['AM', 'A'],
|
amNames: ['AM', 'A'],
|
||||||
pmNames: ['PM', 'P'],
|
pmNames: ['PM', 'P'],
|
||||||
isRTL: false
|
isRTL: false
|
||||||
};
|
};
|
||||||
|
|
||||||
$.datepicker.setDefaults($.datepicker.regional[ region ]);
|
$.datepicker.setDefaults($.datepicker.regional[ region ]);
|
||||||
|
|||||||
@@ -1,44 +1,44 @@
|
|||||||
|
|
||||||
function edit_project_assignments(name){
|
function edit_project_assignments(name){
|
||||||
if ($('#assign_'+name).css('display')=='none'){
|
if ($('#assign_'+name).css('display')=='none'){
|
||||||
$('#view_'+name).hide();
|
$('#view_'+name).hide();
|
||||||
$('#edit_'+name).hide();
|
$('#edit_'+name).hide();
|
||||||
$('#assign_'+name).show();
|
$('#assign_'+name).show();
|
||||||
}else{
|
}else{
|
||||||
cancel_edit_project_assignments(name);
|
cancel_edit_project_assignments(name);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancel_edit_project_assignments(name){
|
function cancel_edit_project_assignments(name){
|
||||||
$('#edit_'+name).hide();
|
$('#edit_'+name).hide();
|
||||||
$('#assign_'+name).hide();
|
$('#assign_'+name).hide();
|
||||||
$('#view_'+name).show();
|
$('#view_'+name).show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function edit_project(name){
|
function edit_project(name){
|
||||||
if ($('#edit_'+name).css('display')=='none'){
|
if ($('#edit_'+name).css('display')=='none'){
|
||||||
$('#view_'+name).hide();
|
$('#view_'+name).hide();
|
||||||
$('#assign_'+name).hide();
|
$('#assign_'+name).hide();
|
||||||
$('#edit_'+name).show();
|
$('#edit_'+name).show();
|
||||||
}else{
|
}else{
|
||||||
cancel_edit_project(name);
|
cancel_edit_project(name);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancel_edit_project(name){
|
function cancel_edit_project(name){
|
||||||
$('#edit_'+name).hide();
|
$('#edit_'+name).hide();
|
||||||
$('#assign_'+name).hide();
|
$('#assign_'+name).hide();
|
||||||
$('#view_'+name).show();
|
$('#view_'+name).show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_project(){
|
function add_project(){
|
||||||
$('.editor').hide();
|
$('.editor').hide();
|
||||||
$('#edit_new').show();
|
$('#edit_new').show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(
|
$(document).ready(
|
||||||
|
|||||||
@@ -1,81 +1,81 @@
|
|||||||
function add_series(){
|
function add_series(){
|
||||||
$('#edit_new').toggle();
|
$('#edit_new').toggle();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function view_series_details(series_id, studio_id, project_id){
|
function view_series_details(series_id, studio_id, project_id){
|
||||||
var elem=$('.series_details_'+series_id).prev();
|
var elem=$('.series_details_'+series_id).prev();
|
||||||
if(elem.hasClass('active')){
|
if(elem.hasClass('active')){
|
||||||
elem.removeClass('active');
|
elem.removeClass('active');
|
||||||
$('.series_details_'+series_id).slideToggle(
|
$('.series_details_'+series_id).slideToggle(
|
||||||
function(){
|
function(){
|
||||||
$('#series_details_'+series_id).html('');
|
$('#series_details_'+series_id).html('');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}else{
|
}else{
|
||||||
elem.addClass('active');
|
elem.addClass('active');
|
||||||
var url="series.cgi?project_id="+project_id+"&studio_id="+studio_id+"&series_id="+series_id+"&action=show";
|
var url="series.cgi?project_id="+project_id+"&studio_id="+studio_id+"&series_id="+series_id+"&action=show";
|
||||||
load(url);
|
load(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
function edit_series(name){
|
function edit_series(name){
|
||||||
if ($('#edit_'+name).css('display')=='none'){
|
if ($('#edit_'+name).css('display')=='none'){
|
||||||
$('#edit_'+name).show();
|
$('#edit_'+name).show();
|
||||||
}else{
|
}else{
|
||||||
cancel_edit_series(name);
|
cancel_edit_series(name);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancel_edit_series(name){
|
function cancel_edit_series(name){
|
||||||
$('#edit_'+name).hide();
|
$('#edit_'+name).hide();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
function edit_scan(name){
|
function edit_scan(name){
|
||||||
if ($('#scan_'+name).css('display')=='none'){
|
if ($('#scan_'+name).css('display')=='none'){
|
||||||
$('#scan_'+name).show();
|
$('#scan_'+name).show();
|
||||||
}else{
|
}else{
|
||||||
cancel_edit_scan(name);
|
cancel_edit_scan(name);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancel_edit_scan(name){
|
function cancel_edit_scan(name){
|
||||||
$('#scan_'+name).hide();
|
$('#scan_'+name).hide();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function edit_schedule(name){
|
function edit_schedule(name){
|
||||||
if ($('#edit_schedule_'+name).css('display')=='none'){
|
if ($('#edit_schedule_'+name).css('display')=='none'){
|
||||||
$('#edit_schedule_'+name).show();
|
$('#edit_schedule_'+name).show();
|
||||||
}else{
|
}else{
|
||||||
cancel_edit_schedule(name);
|
cancel_edit_schedule(name);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancel_edit_schedule(name){
|
function cancel_edit_schedule(name){
|
||||||
$('#edit_schedule_'+name).hide();
|
$('#edit_schedule_'+name).hide();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_schedule(name){
|
function show_schedule(name){
|
||||||
if ($('#show_schedule_'+name).css('display')=='none'){
|
if ($('#show_schedule_'+name).css('display')=='none'){
|
||||||
$('#show_schedule_'+name).show();
|
$('#show_schedule_'+name).show();
|
||||||
}else{
|
}else{
|
||||||
hide_schedule(name);
|
hide_schedule(name);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide_schedule(name){
|
function hide_schedule(name){
|
||||||
$('#show_schedule_'+name).hide();
|
$('#show_schedule_'+name).hide();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ function initTable(){
|
|||||||
scroller_jumpToHeader: true,
|
scroller_jumpToHeader: true,
|
||||||
scroller_idPrefix : 's_'
|
scroller_idPrefix : 's_'
|
||||||
},
|
},
|
||||||
usNumberFormat : false
|
usNumberFormat : false
|
||||||
});
|
});
|
||||||
$('.tablesorter-scroller-header').css('width','95%');
|
$('.tablesorter-scroller-header').css('width','95%');
|
||||||
$('.tablesorter-scroller-table').css('width','95%');
|
$('.tablesorter-scroller-table').css('width','95%');
|
||||||
@@ -62,51 +62,51 @@ function initTable(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(
|
$(document).ready(
|
||||||
function(){
|
function(){
|
||||||
setupLocalization(function(){
|
setupLocalization(function(){
|
||||||
addBackButton();
|
addBackButton();
|
||||||
updateWeekdays();
|
updateWeekdays();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#tabs").tabs({
|
$("#tabs").tabs({
|
||||||
activate: function(){
|
activate: function(){
|
||||||
console.log("set style");
|
console.log("set style");
|
||||||
$('.tablesorter-scroller-header').css('width','95%');
|
$('.tablesorter-scroller-header').css('width','95%');
|
||||||
$('.tablesorter-scroller-table').css('width','95%');
|
$('.tablesorter-scroller-table').css('width','95%');
|
||||||
$('.tablesorter-scroller-header table').css('width','95%');
|
$('.tablesorter-scroller-header table').css('width','95%');
|
||||||
$('.tablesorter-scroller-table table').css('width','95%');
|
$('.tablesorter-scroller-table table').css('width','95%');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#tabs').removeClass('ui-widget ui-widget-content ui-corner-all');
|
$('#tabs').removeClass('ui-widget ui-widget-content ui-corner-all');
|
||||||
|
|
||||||
initTextWidth();
|
initTextWidth();
|
||||||
|
|
||||||
setTextWidth('.datetimepicker.start', 130);
|
setTextWidth('.datetimepicker.start', 130);
|
||||||
setTextWidth('.datetimepicker.end', 130);
|
setTextWidth('.datetimepicker.end', 130);
|
||||||
setTextWidth('.datetimepicker.end_date', 90);
|
setTextWidth('.datetimepicker.end_date', 90);
|
||||||
setTextWidth('.datetimepicker.weekday', 20);
|
setTextWidth('.datetimepicker.weekday', 20);
|
||||||
setTextWidth('.datetimepicker.frequency', 20);
|
setTextWidth('.datetimepicker.frequency', 20);
|
||||||
|
|
||||||
initRegions(region);
|
initRegions(region);
|
||||||
|
|
||||||
showDateTimePicker('.datetimepicker.start', {
|
showDateTimePicker('.datetimepicker.start', {
|
||||||
onSelect: function(){updateWeekdays();}
|
onSelect: function(){updateWeekdays();}
|
||||||
});
|
});
|
||||||
showDateTimePicker('.datetimepicker.end', {
|
showDateTimePicker('.datetimepicker.end', {
|
||||||
onSelect: function(){updateWeekdays();}
|
onSelect: function(){updateWeekdays();}
|
||||||
});
|
});
|
||||||
showDatePicker('.datetimepicker.end_date', {
|
showDatePicker('.datetimepicker.end_date', {
|
||||||
onSelect: function(){updateWeekdays();}
|
onSelect: function(){updateWeekdays();}
|
||||||
});
|
});
|
||||||
|
|
||||||
setSelectedOptions();
|
setSelectedOptions();
|
||||||
|
|
||||||
showYearPicker('#show_date', {
|
showYearPicker('#show_date', {
|
||||||
onSelect: function(){
|
onSelect: function(){
|
||||||
showDates();
|
showDates();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
showDates();
|
showDates();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
var region='<TMPL_VAR loc.region>';
|
var region='<TMPL_VAR loc.region>';
|
||||||
|
|
||||||
function edit_studio(name){
|
function edit_studio(name){
|
||||||
if ($('#edit_'+name).css('display')=='none'){
|
if ($('#edit_'+name).css('display')=='none'){
|
||||||
$('#view_'+name).hide();
|
$('#view_'+name).hide();
|
||||||
$('#edit_'+name).show();
|
$('#edit_'+name).show();
|
||||||
}else{
|
}else{
|
||||||
cancel_edit_studio(name);
|
cancel_edit_studio(name);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function add_studio(){
|
function add_studio(){
|
||||||
$('.editor').hide();
|
$('.editor').hide();
|
||||||
$('#edit_new').show();
|
$('#edit_new').show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function cancel_edit_studio(name){
|
function cancel_edit_studio(name){
|
||||||
$('#edit_'+name).hide();
|
$('#edit_'+name).hide();
|
||||||
$('#view_'+name).show();
|
$('#view_'+name).show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#! /usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
print qq{HTTP/1.0 401 Unauthorized
|
print qq{HTTP/1.0 401 Unauthorized
|
||||||
Request Version: HTTP/1.0
|
Request Version: HTTP/1.0
|
||||||
|
|||||||
Reference in New Issue
Block a user