Changeset 1183

Show
Ignore:
Timestamp:
22-11-10 17:28:21 (3 years ago)
Author:
work@…
Message:

Automated continuous integration commit of minified JS/CSS

Location:
trunk/web-app
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/web-app/css/wizard.min.css

    r981 r1183  
    1 .wizard{display:block;padding-top:10px;}.wizard .info{display:block;border:1px solid #006DBA;background-color:#f8feff;padding:10px;font-size:10px;margin:10px 0 10px 0;}.wizard .info .title{color:#006DBA;font-size:14px;font-weight:normal;display:block;margin-bottom:5px;padding-left:20px;background:url(../plugins/famfamfam-1.0.1/images/icons/information.png) no-repeat center left;}.wizard .info .error{color:#006DBA;font-size:14px;font-weight:normal;display:block;margin-bottom:5px;padding-left:20px;background:url(../plugins/famfamfam-1.0.1/images/icons/error.png) no-repeat center left;}.wizard .info .warning{color:#006DBA;font-size:14px;font-weight:normal;display:block;margin-bottom:5px;padding-left:20px;background:url(../plugins/famfamfam-1.0.1/images/icons/exclamation.png) no-repeat center left;}.wizard .info .todo{color:#006DBA;font-size:14px;font-weight:normal;display:block;margin-bottom:5px;padding-left:20px;background:url(../plugins/famfamfam-1.0.1/images/icons/wrench.png) no-repeat center left;}.wizard .info .known{color:#006DBA;font-size:14px;font-weight:normal;display:block;margin-bottom:5px;padding-left:20px;background:url(../plugins/famfamfam-1.0.1/images/icons/eye.png) no-repeat center left;}.wizard .famfamfam{width:16px;height:16px;}.wizard .spinner{background:url(../images/spinner.gif) no-repeat left top;width:16px;height:16px;display:none;}.wizard .sliderContainer{display:block;margin-top:10px;width:150px;}.wizard .tabs{display:block;padding-bottom:2px;border-bottom:2px solid #006DBA;width:100%;}.wizard .tabs ul{list-style-type:none;padding:0;font-size:10px;margin:0;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;height:20px;width:100%;}.wizard .tabs img{border:0;}.wizard .tabs li{float:left;margin:0;height:20px;float:left;display:block;text-align:center;text-decoration:none;color:#006DBA;background:#CCC;font-weight:bold;}.wizard .tabs .content{padding:0 10px 0 10px;display:inline;border:0;}.wizard .tabs .active{background-color:#006DBA!important;color:#fff!important;text-shadow:0 0 1px #333;}.wizard .tabs .arrow{position:inherit;margin-top:0;margin-bottom:0;display:inline;}.wizard .content{display:block;padding-bottom:10px;border-bottom:2px solid #006DBA;}.wizard .navigation{display:block;color:#666;font-size:10px;}.wizard .prevnext{cursor:pointer;color:#006DBA;background-color:transparent;border:none;}.wizard .element .input .isExample{color:#006DBA;background-color:transparent;border:0;input:disabled;}.wizard .element{display:block;}.wizard .element .description{display:inline-block;font-size:11px;width:250px;word-wrap:break-word;zoom:1;*display:inline;}.wizard .element .input{display:inline;font-size:11px;word-wrap:break-word;}.wizard .element .input input[type="radio"]{margin-top:10px;margin-right:5px;}.wizard .required{background:url(../plugins/famfamfam-1.0.1/images/icons/bullet_go.png) no-repeat 230px 4px;}.wizard .error{background:url(../plugins/famfamfam-1.0.1/images/icons/exclamation.png) no-repeat 230px 2px;}.wizard .element .input input,textarea{vertical-align:top;border:1px solid #CCC;margin:2px 0;padding:2px 4px;background-color:#fff;}.wizard .element .input input:focus,select:focus,textarea:focus{border:1px solid #B2D1FF;background-color:#fff;}.wizard .element .helpIcon{display:inline-block;margin-top:4px;background:url(../plugins/famfamfam-1.0.1/images/icons/help.png) no-repeat left top;width:16px;height:16px;zoom:1;*display:inline;}.wizard .element .helpContent{display:none;}.wizard .table{display:block;border:1px solid #575a5d;background-color:#ebf7fc;margin-top:10px;font-size:11px;overflow:hidden;white-space:nowrap;}.wizard .table b{color:#006dba;font-weight:bold;}.wizard .table .selectAll{display:inline-block;background-color:red;background:url(../plugins/famfamfam-1.0.1/images/icons/control_eject.png) no-repeat center center;-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180g);cursor:pointer;}.wizard .table .header{display:block;background-color:#006DBA;color:#fff;font-weight:bold;width:auto;height:32px;line-height:32px;text-shadow:0 0 1px #333;}.wizard .column .helpIcon{display:inline-block;margin-top:4px;background:url(../plugins/famfamfam-1.0.1/images/icons/help.png) no-repeat left top;width:16px;height:16px;zoom:1;*display:inline;}.wizard .column{display:inline-block;padding:2px 4px;min-width:120px;zoom:1;*display:inline;}.wizard .firstColumn{display:inline-block;padding:2px 4px;width:20px;zoom:1;*display:inline;}.wizard .table .row{display:block;height:32px;border-top:1px solid #8e908f;width:auto;}.wizard .table .row input,.wizard .table .row select{background-color:#fff;}.wizard .table .ui-selected{background-color:#ffab7b;}.wizard .table .ui-selecting{background-color:#f2e3bc;}.wizard .table .row .warning{color:red;font-size:8px;height:10px;}.wizard .table .row .error{background-color:#ffb0b7;}.wizard .table input[type=text],.wizard .table select{border:1px solid #8e908f;margin:2px 0;padding:2px 4px;background-color:transparent;width:100px;}.wizard .table .header input[type=text],.wizard .table .header select,.wizard .table .header button{border:1px solid #8e908f;margin:2px 0;padding:2px 4px;background-color:#fff;width:75px;}.wizard .table .highlight,.wizard .table .highlight input,.wizard .table .highlight select,.wizard .table .highlight b{background-color:#006DBA;color:#fff;}.wizard .table .highlight input,.wizard .table .highlight select{background-color:#6e99d4;color:#fff;}.wizard .bigbutton{background:url(../images/wizard/big-button.jpg) no-repeat left top;border:0;width:454px;height:53px;color:#fff;font-size:18pt;}.wizard .bigbutton:hover{color:#000;}.wizard .bigtext{color:#006dba;font-weight:normal;font-size:24px;margin:.8em 0 .3em 0;display:block;width:100%;text-align:center;}.vertical{writing-mode:tb-rl;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);white-space:nowrap;display:block;bottom:0;width:20px;height:100px;text-shadow:0 0 1px #333;border:1px solid red;}.wizard .upload_button{display:inline;border:1px solid #006dba;padding:4px 8px;cursor:pointer;line-height:26px;}.wizard .upload_info{display:inline;color:#006dba;margin-left:5px;}.wizard .upload_info .error{color:red;}.wizard ul.publication_list,.wizard ul.contact_list,.wizard ul.user_list{list-style-type:none;margin:-10px 0 0 255px;padding:0;}.wizard ul.publication_list li,.wizard ul.contact_list li,.wizard ul.user_list li{margin-left:0;padding:4px 6px;}.wizard li.even{background-color:#F3F3F3;}.wizard li.odd{background-color:#FAFAFA;}.wizard li .delete_button{float:right;margin-left:10px;cursor:pointer;}.wizard ul.publication_list li .authors{font-size:10px;margin-top:3px;color:#333;}.wizard ul.contact_list li .person{display:inline;}.wizard ul.contact_list li .role{color:#009;display:inline;margin-left:5px;}.wizard ul.contact_list li .role:before{content:' / ';color:#009;}.wizard .contacts_dialog{margin:5px 0;} 
     1.wizard{display:block;padding-top:10px;}.wizard .info{display:block;border:1px solid #006DBA;background-color:#f8feff;padding:10px;font-size:10px;margin:10px 0 10px 0;}.wizard .info .title{color:#006DBA;font-size:14px;font-weight:normal;display:block;margin-bottom:5px;padding-left:20px;background:url(../plugins/famfamfam-1.0.1/images/icons/information.png) no-repeat center left;}.wizard .info .error{color:#006DBA;font-size:14px;font-weight:normal;display:block;margin-bottom:5px;padding-left:20px;background:url(../plugins/famfamfam-1.0.1/images/icons/error.png) no-repeat center left;}.wizard .info .warning{color:#006DBA;font-size:14px;font-weight:normal;display:block;margin-bottom:5px;padding-left:20px;background:url(../plugins/famfamfam-1.0.1/images/icons/exclamation.png) no-repeat center left;}.wizard .info .todo{color:#006DBA;font-size:14px;font-weight:normal;display:block;margin-bottom:5px;padding-left:20px;background:url(../plugins/famfamfam-1.0.1/images/icons/wrench.png) no-repeat center left;}.wizard .info .known{color:#006DBA;font-size:14px;font-weight:normal;display:block;margin-bottom:5px;padding-left:20px;background:url(../plugins/famfamfam-1.0.1/images/icons/eye.png) no-repeat center left;}.wizard .famfamfam{width:16px;height:16px;}.wizard .spinner{background:url(../images/spinner.gif) no-repeat left top;width:16px;height:16px;display:none;}.wizard .sliderContainer{display:block;margin-top:10px;width:150px;}.wizard .tabs{display:block;padding-bottom:2px;border-bottom:2px solid #006DBA;width:100%;}.wizard .tabs ul{list-style-type:none;padding:0;font-size:10px;margin:0;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;height:20px;width:100%;}.wizard .tabs img{border:0;}.wizard .tabs li{float:left;margin:0;height:20px;float:left;display:block;text-align:center;text-decoration:none;color:#006DBA;background:#CCC;font-weight:bold;}.wizard .tabs .content{padding:0 10px 0 10px;display:inline;border:0;}.wizard .tabs .active{background-color:#006DBA!important;color:#fff!important;text-shadow:0 0 1px #333;}.wizard .tabs .arrow{position:inherit;margin-top:0;margin-bottom:0;display:inline;}.wizard .content{display:block;padding-bottom:10px;border-bottom:2px solid #006DBA;}.wizard .navigation{display:block;color:#666;font-size:10px;}.wizard .prevnext{cursor:pointer;color:#006DBA;background-color:transparent;border:none;}.wizard .element .input .isExample{color:#006DBA;background-color:transparent;border:0;input:disabled;}.wizard .element{display:block;}.wizard .element .description{display:inline-block;font-size:11px;width:250px;word-wrap:break-word;zoom:1;*display:inline;}.wizard .element .input{display:inline;font-size:11px;word-wrap:break-word;}.wizard .element .input input[type="radio"]{margin-top:10px;margin-right:5px;}.wizard .required{background:url(../plugins/famfamfam-1.0.1/images/icons/bullet_go.png) no-repeat 230px 4px;}.wizard .error{background:url(../plugins/famfamfam-1.0.1/images/icons/exclamation.png) no-repeat 230px 2px;}.wizard .element .input input,textarea{vertical-align:top;border:1px solid #CCC;margin:2px 0;padding:2px 4px;background-color:#fff;}.wizard .element .input input:focus,select:focus,textarea:focus{border:1px solid #B2D1FF;background-color:#fff;}.wizard .element .helpIcon{display:inline-block;margin-top:4px;background:url(../plugins/famfamfam-1.0.1/images/icons/help.png) no-repeat left top;width:16px;height:16px;zoom:1;*display:inline;}.wizard .element .helpContent{display:none;}.wizard .table{display:block;border:1px solid #575a5d;background-color:#ebf7fc;margin-top:10px;font-size:11px;overflow:hidden;white-space:nowrap;}.wizard .table b{color:#006dba;font-weight:bold;}.wizard .table .selectAll{display:inline-block;background-color:red;background:url(../plugins/famfamfam-1.0.1/images/icons/control_eject.png) no-repeat center center;-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180g);cursor:pointer;}.wizard .table .header{display:block;background-color:#006DBA;color:#fff;font-weight:bold;width:auto;height:32px;line-height:32px;text-shadow:0 0 1px #333;}.wizard .column .helpIcon{display:inline-block;margin-top:4px;background:url(../plugins/famfamfam-1.0.1/images/icons/help.png) no-repeat left top;width:16px;height:16px;zoom:1;*display:inline;}.wizard .column{display:inline-block;padding:2px 4px;min-width:120px;zoom:1;*display:inline;}.wizard .firstColumn{display:inline-block;padding:2px 4px;width:20px;zoom:1;*display:inline;}.wizard .table .row{display:block;height:32px;border-top:1px solid #8e908f;width:auto;}.wizard .table .row input,.wizard .table .row select{background-color:#fff;}.wizard .table .ui-selected{background-color:#ffab7b;}.wizard .table .ui-selecting{background-color:#f2e3bc;}.wizard .table .row .warning{color:red;font-size:8px;height:10px;}.wizard .table .row .error{background-color:#ffb0b7;}.wizard .table input[type=text],.wizard .table select{border:1px solid #8e908f;margin:2px 0;padding:2px 4px;background-color:transparent;width:100px;}.wizard .table .header input[type=text],.wizard .table .header select,.wizard .table .header button{border:1px solid #8e908f;margin:2px 0;padding:2px 4px;background-color:#fff;width:75px;}.wizard .table .highlight,.wizard .table .highlight input,.wizard .table .highlight select,.wizard .table .highlight b{background-color:#006DBA;color:#fff;}.wizard .table .highlight input,.wizard .table .highlight select{background-color:#6e99d4;color:#fff;}.wizard .bigbutton{background:url(../images/wizard/big-button.jpg) no-repeat left top;border:0;width:454px;height:53px;color:#fff;font-size:18pt;}.wizard .bigbutton:hover{color:#000;}.wizard .bigtext{color:#006dba;font-weight:normal;font-size:24px;margin:.8em 0 .3em 0;display:block;width:100%;text-align:center;}.vertical{writing-mode:tb-rl;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);white-space:nowrap;display:block;bottom:0;width:20px;height:100px;text-shadow:0 0 1px #333;border:1px solid red;}.wizard .upload_button{display:inline;border:1px solid #006dba;padding:4px 8px;cursor:pointer;line-height:26px;}.wizard .upload_info{display:inline;color:#006dba;margin-left:5px;}#content .wizard .upload_info a{text-decoration:underline;}.wizard .upload_del img{border-width:0;padding-left:6px;}.wizard .upload_del{display:none;}.wizard .upload_info .error{color:red;}.wizard ul.publication_list,.wizard ul.contact_list,.wizard ul.user_list{list-style-type:none;margin:-10px 0 0 255px;padding:0;}.wizard ul.publication_list li,.wizard ul.contact_list li,.wizard ul.user_list li{margin-left:0;padding:4px 6px;}.wizard li.even{background-color:#F3F3F3;}.wizard li.odd{background-color:#FAFAFA;}.wizard li .delete_button{float:right;margin-left:10px;cursor:pointer;}.wizard ul.publication_list li .authors{font-size:10px;margin-top:3px;color:#333;}.wizard ul.contact_list li .person{display:inline;}.wizard ul.contact_list li .role{color:#009;display:inline;margin-left:5px;}.wizard ul.contact_list li .role:before{content:' / ';color:#009;}.wizard .contacts_dialog{margin:5px 0;} 
  • trunk/web-app/js/wizard.min.js

    r1041 r1183  
    1 var warnOnRedirect=true;$(document).ready(function(){insertOnRedirectWarning();onWizardPage()});function onWizardPage(){attachHelpTooltips();attachDatePickers();attachDateTimePickers();attachTableEvents();handleWizardTable();new TableEditor().init({tableIdentifier:"div.table",rowIdentifier:"div.row",columnIdentifier:"div.column",headerIdentifier:"div.header"});new OntologyChooser().init();new SelectAddMore().init({rel:"term",url:baseUrl+"/termEditor",vars:"ontologies",label:"add more...",style:"addMore",onClose:function(a){refreshWebFlow()}});new SelectAddMore().init({rel:"template",url:baseUrl+"/templateEditor",vars:"entity,ontologies",label:"add / modify..",style:"modify",onClose:function(a){refreshWebFlow()}});new SelectAddMore().init({rel:"person",url:baseUrl+"/person/list?dialog=true",vars:"person",label:"add / modify persons...",style:"modify",onClose:function(a){refreshWebFlow()}});new SelectAddMore().init({rel:"role",url:baseUrl+"/personRole/list?dialog=true",vars:"role",label:"add / modify roles...",style:"modify",onClose:function(a){refreshWebFlow()}});$("#accordion").accordion({autoHeight:false})}function insertOnRedirectWarning(){$("a").each(function(){var a=$(this);var b=/^#/gi;if(!a.attr("href").match(/^#/gi)&&!a.attr("href").match(/\/([^\/]+)\/wizard\/pages/gi)){a.bind("click",function(){if(warnOnRedirect){return onDirectWarning()}})}})}function onDirectWarning(){return confirm("Warning: navigating away from the wizard causes loss of work and unsaved data. Are you sure you want to continue?")}function attachHelpTooltips(){$("div#wizard").find("div.helpIcon").each(function(){helpIcon=$(this);helpContent=helpIcon.parent().find("div.helpContent");if(!helpContent.html()){helpContent=helpIcon.parent().parent().find("div.helpContent")}var html=(helpContent.html())?helpContent.html():"";if(html){var specialContent=html.match(/\[([^:]+)\:([^\]]+)\]/);if(specialContent){eval(specialContent[1]+"('"+specialContent[2]+"',helpContent)")}helpIcon.qtip({content:"leftMiddle",position:{corner:{tooltip:"leftMiddle",target:"rightMiddle"}},style:{border:{width:5,radius:10},padding:10,textAlign:"center",tip:true,name:"blue"},content:helpContent.html(),show:"mouseover",hide:"mouseout",api:{beforeShow:function(){}}});helpContent.remove()}})}function youtube(b,a){a.html("<div id='"+b+"'></div>");var c={allowScriptAccess:"always"};var d={id:"myytplayer_"+b};swfobject.embedSWF("http://www.youtube.com/v/"+b+"?enablejsapi=1&playerapiid=ytplayer_"+b,b,"200","150","8",null,null,c,d)}function onYouTubePlayerReady(a){ytplayer=document.getElementById("my"+a);ytplayer.playVideo()}function attachDatePickers(){$("div#wizard").find("input[type=text][rel$='date']").each(function(){$(this).datepicker({numberOfMonths:3,showButtonPanel:true,changeMonth:true,changeYear:true,dateFormat:"dd/mm/yy",yearRange:"c-80:c+20",altField:"#"+$(this).attr("name")+"Example",altFormat:"DD, d MM, yy"})})}function attachDateTimePickers(){$("div#wizard").find("input[type=text][rel$='datetime']").each(function(){$(this).datepicker({changeMonth:true,changeYear:true,dateFormat:"dd/mm/yy",altField:"#"+$(this).attr("name")+"Example",altTimeField:"#"+$(this).attr("name")+"Example2",altFormat:"DD, d MM, yy",showTime:true,time24h:true})})}function attachTableEvents(){$("div#wizard").find("div.row").each(function(){$(this).hover(function(){$(this).addClass("highlight")},function(){$(this).removeClass("highlight")})})}function handleWizardTable(){var b=this;var a=$("div#wizard").find("div.table");a.each(function(){var e=$(this);var h=(e.next().attr("class")=="sliderContainer")?e.next():null;var i=e.find("div.header");var g=20;var f=0;var d=[];var c=[];i.children().each(function(){var n=$(this);var l=n.width();var j=parseInt(n.css("padding-left"),10)+parseInt(n.css("padding-right"),10);var m=parseInt(n.css("margin-left"),10)+parseInt(n.css("margin-right"),10);var k=parseInt(n.css("borderLeftWidth"),10)+parseInt(n.css("borderRightWidth"),10);if(j){l+=j}if(m){l+=m}if(k){l+=k}g+=l;c[f]=(n.attr("rel")=="resized");d[f]=n.width();f++});i.css({width:g+"px"});e.find("div.row").each(function(){var k=$(this);var j=0;k.children().each(function(){var l=$(this);l.css({width:d[j]+"px"});if(c[j]){$(":input",l).each(function(){$(this).css({width:(d[j]-10)+"px"})})}j++});k.css({width:g+"px"})});if(h){if(i.width()<e.width()){h.hide()}else{h.slider({value:1,min:1,max:i.width()-e.width(),step:1,slide:function(j,k){e.find("div.header, div.row").css({"margin-left":(1-k.value)+"px"})}})}}})}function showExampleReltime(a){var d=a.name;var b=function(f,g,e){if(e.status==200){document.getElementById(d+"Example").value=f}};var c=function(e,g,f){document.getElementById(d+"Example").value=""};$.ajax({url:baseUrl+"/wizard/ajaxParseRelTime?reltime="+a.value,success:b,error:c})}function fileUploadField(a){new AjaxUpload("#upload_button_"+a,{action:baseUrl+"/file/upload",data:{},name:a,autoSubmit:true,onChange:function(b,c){oldFile=$("#"+a).val();if(oldFile!=""){if(!confirm("The old file is deleted when uploading a new file. Do you want to continue?")){return false}}this.setData({field:a,oldFile:oldFile});$("#"+a+"Example").html("Uploading "+createFileHTML(b))},onComplete:function(c,b){if(b==""){$("#"+a).val("");$("#"+a+"Example").html('<span class="error">Error uploading '+createFileHTML(c)+"</span>")}else{$("#"+a).val(b);$("#"+a+"Example").html("Uploaded "+createFileHTML(c))}}})}function createFileHTML(a){return'<a target="_blank" href="'+baseUrl+"/file/get/"+a+'">'+a+"</a>"}function addPublication(a){jQuery.ajax({type:"GET",url:baseUrl+"/publication/getID?"+$("#"+a+"_form").serialize(),success:function(c,e){var d=parseInt(c);var b=getPublicationIds(a);if($.inArray(d,b)==-1){b[b.length]=d;$("#"+a+"_ids").val(b.join(","));showPublication(a,d,$("#"+a+"_form").find("[name=publication-title]").val(),$("#"+a+"_form").find("[name=publication-authorsList]").val(),b.length-1);$("#"+a+"_none").css("display","none")}},error:function(b,d,c){alert("Publication could not be added.")}});return false}function removePublication(b,d){var c=getPublicationIds(b);if($.inArray(d,c)!=-1){c.splice($.inArray(d,c),1);$("#"+b+"_ids").val(c.join(","));var a=$("#"+b+"_item_"+d);if(a){a.remove()}if(c.length==0){$("#"+b+"_none").css("display","inline")}}}function getPublicationIds(a){var c=$("#"+a+"_ids").val();if(c==""){return new Array()}else{ids_array=c.split(",");for(var b=0;b<ids_array.length;b++){ids_array[b]=parseInt(ids_array[b])}return ids_array}}function showPublication(c,a,g,f,h){var e=document.createElement("img");e.className="famfamfam delete_button";e.setAttribute("alt","remove this publication");e.setAttribute("src",baseUrl+"/plugins/famfamfam-1.0.1/images/icons/delete.png");e.onclick=function(){removePublication(c,a);return false};var b=document.createElement("div");b.className="title";b.appendChild(document.createTextNode(g));var d=document.createElement("div");d.className="authors";d.appendChild(document.createTextNode(f));var i=document.createElement("li");i.setAttribute("id",c+"_item_"+a);i.className=h%2==0?"even":"odd";i.appendChild(e);i.appendChild(b);i.appendChild(d);$("#"+c+"_list").append(i)}function createPublicationDialog(a){if($("."+a+"_publication_dialog").length==0){$("#"+a+"_dialog").dialog({title:"Add publication",autoOpen:false,width:800,height:400,modal:true,dialogClass:a+"_publication_dialog",position:"center",buttons:{Add:function(){addPublication(a);$(this).dialog("close")},Close:function(){$(this).dialog("close")}},close:function(){}}).width(790).height(400)}else{$("#"+a+"_dialog").remove()}}function openPublicationDialog(a){var b=$("#"+a);b.autocomplete("close");b.val("");$("#"+a+"_dialog").dialog("open");b.focus();enableButton("."+a+"_publication_dialog","Add",false)}function getDialogButton(b,a){var e=$(b+" .ui-dialog-buttonpane button");for(var d=0;d<e.length;++d){var c=$(e[d]);if(c.text()==a){return c}}return null}function enableButton(b,a,c){var d=getDialogButton(b,a);if(d){if(c){d.attr("disabled","");d.removeClass("ui-state-disabled")}else{d.attr("disabled","disabled");d.addClass("ui-state-disabled")}}}function addContact(b){var e=$("#"+b+"_person").val();var a=$("#"+b+"_role").val();if(e==""||e==0||a==""||a==0){alert("Please select both a person and a role.");return false}var c=e+"-"+a;var d=getContactIds(b);if($.inArray(c,d)==-1){d[d.length]=c;$("#"+b+"_ids").val(d.join(","));showContact(b,c,$("#"+b+"_person  :selected").text(),$("#"+b+"_role :selected").text(),d.length-1);$("#"+b+"_none").css("display","none")}return true}function removeContact(b,c){var d=getContactIds(b);if($.inArray(c,d)!=-1){d.splice($.inArray(c,d),1);$("#"+b+"_ids").val(d.join(","));var a=$("#"+b+"_item_"+c);if(a){a.remove()}if(d.length==0){$("#"+b+"_none").css("display","inline")}}}function getContactIds(a){var b=$("#"+a+"_ids").val();if(b==""){return new Array()}else{ids_array=b.split(",");return ids_array}}function showContact(c,a,d,f,h){var g=document.createElement("img");g.className="famfamfam delete_button";g.setAttribute("alt","remove this person");g.setAttribute("src",baseUrl+"/plugins/famfamfam-1.0.1/images/icons/delete.png");g.onclick=function(){removeContact(c,a);return false};var b=document.createElement("div");b.className="person";b.appendChild(document.createTextNode(d));var e=document.createElement("div");e.className="role";e.appendChild(document.createTextNode(f));var i=document.createElement("li");i.setAttribute("id",c+"_item_"+a);i.className=h%2==0?"even":"odd";i.appendChild(g);i.appendChild(b);i.appendChild(e);$("#"+c+"_list").append(i)}function addUser(a){id=parseInt($("#"+a+"_form select").val());var b=getUserIds(a);if($.inArray(id,b)==-1){b[b.length]=id;$("#"+a+"_ids").val(b.join(","));showUser(a,id,$("#"+a+"_form select option:selected").text(),b.length-1);$("#"+a+"_none").css("display","none")}return false}function removeUser(b,d){var c=getUserIds(b);if($.inArray(d,c)!=-1){c.splice($.inArray(d,c),1);$("#"+b+"_ids").val(c.join(","));var a=$("#"+b+"_item_"+d);if(a){a.remove()}if(c.length==0){$("#"+b+"_none").css("display","inline")}}}function getUserIds(a){var c=$("#"+a+"_ids").val();if(c==""){return new Array()}else{ids_array=c.split(",");for(var b=0;b<ids_array.length;b++){ids_array[b]=parseInt(ids_array[b])}return ids_array}}function showUser(c,g,f,d){var b=document.createElement("img");b.className="famfamfam delete_button";b.setAttribute("alt","remove this user");b.setAttribute("src",baseUrl+"/plugins/famfamfam-1.0.1/images/icons/delete.png");b.onclick=function(){removeUser(c,g);return false};var e=document.createElement("div");e.className="username";e.appendChild(document.createTextNode(f));var a=document.createElement("li");a.setAttribute("id",c+"_item_"+g);a.className=d%2==0?"even":"odd";a.appendChild(b);a.appendChild(e);$("#"+c+"_list").append(a)}function createUserDialog(a){if($("."+a+"_user_dialog").length==0){$("#"+a+"_dialog").dialog({title:"Add user",autoOpen:false,width:800,height:400,modal:true,dialogClass:a+"_user_dialog",position:"center",buttons:{Add:function(){addUser(a);$(this).dialog("close")},Close:function(){$(this).dialog("close")}},close:function(){}}).width(790).height(400)}else{$("#"+a+"_dialog").remove()}}function openUserDialog(a){var b=$("#"+a);b.val("");$("#"+a+"_dialog").dialog("open");b.focus()}; 
     1var warnOnRedirect=true;$(document).ready(function(){insertOnRedirectWarning();onWizardPage()});function onWizardPage(){attachHelpTooltips();attachDatePickers();attachDateTimePickers();attachTableEvents();handleWizardTable();new TableEditor().init({tableIdentifier:"div.table",rowIdentifier:"div.row",columnIdentifier:"div.column",headerIdentifier:"div.header"});new OntologyChooser().init();new SelectAddMore().init({rel:"term",url:baseUrl+"/termEditor",vars:"ontologies",label:"add more...",style:"addMore",onClose:function(a){refreshWebFlow()}});new SelectAddMore().init({rel:"template",url:baseUrl+"/templateEditor",vars:"entity,ontologies",label:"add / modify..",style:"modify",onClose:function(a){refreshWebFlow()}});new SelectAddMore().init({rel:"person",url:baseUrl+"/person/list?dialog=true",vars:"person",label:"add / modify persons...",style:"modify",onClose:function(a){refreshWebFlow()}});new SelectAddMore().init({rel:"role",url:baseUrl+"/personRole/list?dialog=true",vars:"role",label:"add / modify roles...",style:"modify",onClose:function(a){refreshWebFlow()}});$("#accordion").accordion({autoHeight:false})}function insertOnRedirectWarning(){$("a").each(function(){var a=$(this);var b=/^#/gi;if(!a.attr("href").match(/^#/gi)&&!a.attr("href").match(/\/([^\/]+)\/wizard\/pages/gi)){a.bind("click",function(){if(warnOnRedirect){return onDirectWarning()}})}})}function onDirectWarning(){return confirm("Warning: navigating away from the wizard causes loss of work and unsaved data. Are you sure you want to continue?")}function attachHelpTooltips(){$("div#wizard").find("div.helpIcon").each(function(){helpIcon=$(this);helpContent=helpIcon.parent().find("div.helpContent");if(!helpContent.html()){helpContent=helpIcon.parent().parent().find("div.helpContent")}var html=(helpContent.html())?helpContent.html():"";if(html){var specialContent=html.match(/\[([^:]+)\:([^\]]+)\]/);if(specialContent){eval(specialContent[1]+"('"+specialContent[2]+"',helpContent)")}helpIcon.qtip({content:"leftMiddle",position:{corner:{tooltip:"leftMiddle",target:"rightMiddle"}},style:{border:{width:5,radius:10},padding:10,textAlign:"center",tip:true,name:"blue"},content:helpContent.html(),show:"mouseover",hide:"mouseout",api:{beforeShow:function(){}}});helpContent.remove()}})}function youtube(b,a){a.html("<div id='"+b+"'></div>");var c={allowScriptAccess:"always"};var d={id:"myytplayer_"+b};swfobject.embedSWF("http://www.youtube.com/v/"+b+"?enablejsapi=1&playerapiid=ytplayer_"+b,b,"200","150","8",null,null,c,d)}function onYouTubePlayerReady(a){ytplayer=document.getElementById("my"+a);ytplayer.playVideo()}function attachDatePickers(){$("div#wizard").find("input[type=text][rel$='date']").each(function(){$(this).datepicker({numberOfMonths:3,showButtonPanel:true,changeMonth:true,changeYear:true,dateFormat:"dd/mm/yy",yearRange:"c-80:c+20",altField:"#"+$(this).attr("name")+"Example",altFormat:"DD, d MM, yy"})})}function attachDateTimePickers(){$("div#wizard").find("input[type=text][rel$='datetime']").each(function(){$(this).datepicker({changeMonth:true,changeYear:true,dateFormat:"dd/mm/yy",altField:"#"+$(this).attr("name")+"Example",altTimeField:"#"+$(this).attr("name")+"Example2",altFormat:"DD, d MM, yy",showTime:true,time24h:true})})}function attachTableEvents(){$("div#wizard").find("div.row").each(function(){$(this).hover(function(){$(this).addClass("highlight")},function(){$(this).removeClass("highlight")})})}function handleWizardTable(){var b=this;var a=$("div#wizard").find("div.table");a.each(function(){var e=$(this);var h=(e.next().attr("class")=="sliderContainer")?e.next():null;var i=e.find("div.header");var g=20;var f=0;var d=[];var c=[];i.children().each(function(){var n=$(this);var l=n.width();var j=parseInt(n.css("padding-left"),10)+parseInt(n.css("padding-right"),10);var m=parseInt(n.css("margin-left"),10)+parseInt(n.css("margin-right"),10);var k=parseInt(n.css("borderLeftWidth"),10)+parseInt(n.css("borderRightWidth"),10);if(j){l+=j}if(m){l+=m}if(k){l+=k}g+=l;c[f]=(n.attr("rel")=="resized");d[f]=n.width();f++});i.css({width:g+"px"});e.find("div.row").each(function(){var k=$(this);var j=0;k.children().each(function(){var l=$(this);l.css({width:d[j]+"px"});if(c[j]){$(":input",l).each(function(){$(this).css({width:(d[j]-10)+"px"})})}j++});k.css({width:g+"px"})});if(h){if(i.width()<e.width()){h.hide()}else{h.slider({value:1,min:1,max:i.width()-e.width(),step:1,slide:function(j,k){e.find("div.header, div.row").css({"margin-left":(1-k.value)+"px"})}})}}})}function showExampleReltime(a){var d=a.name;var b=function(f,g,e){if(e.status==200){document.getElementById(d+"Example").value=f}};var c=function(e,g,f){document.getElementById(d+"Example").value=""};$.ajax({url:baseUrl+"/wizard/ajaxParseRelTime?reltime="+a.value,success:b,error:c})}function fileUploadField(a){new AjaxUpload("#upload_button_"+a,{action:baseUrl+"/file/upload",data:{},name:a,autoSubmit:true,onChange:function(b,c){oldFile=$("#"+a).val();if(oldFile!=""){if(!confirm("The old file is deleted when uploading a new file. Do you want to continue?")){return false}}this.setData({field:a,oldFile:oldFile});$("#"+a+"Example").html("Uploading "+createFileHTML(b));$("#"+a+"Delete").hide()},onComplete:function(c,b){if(b==""){$("#"+a).val("");$("#"+a+"Example").html('<span class="error">Error uploading '+createFileHTML(c)+"</span>");$("#"+a+"Delete").hide()}else{$("#"+a).val(b);$("#"+a+"Example").html("Uploaded "+createFileHTML(c));$("#"+a+"Delete").show()}}})}function deleteFile(a){$("#"+a).val("*deleted*");$("#"+a+"Example").html("File deleted");$("#"+a+"Delete").hide()}function createFileHTML(a){return'<a target="_blank" href="'+baseUrl+"/file/get/"+a+'">'+a+"</a>"}function addPublication(a){jQuery.ajax({type:"GET",url:baseUrl+"/publication/getID?"+$("#"+a+"_form").serialize(),success:function(c,e){var d=parseInt(c);var b=getPublicationIds(a);if($.inArray(d,b)==-1){b[b.length]=d;$("#"+a+"_ids").val(b.join(","));showPublication(a,d,$("#"+a+"_form").find("[name=publication-title]").val(),$("#"+a+"_form").find("[name=publication-authorsList]").val(),b.length-1);$("#"+a+"_none").css("display","none")}},error:function(b,d,c){alert("Publication could not be added.")}});return false}function removePublication(b,d){var c=getPublicationIds(b);if($.inArray(d,c)!=-1){c.splice($.inArray(d,c),1);$("#"+b+"_ids").val(c.join(","));var a=$("#"+b+"_item_"+d);if(a){a.remove()}if(c.length==0){$("#"+b+"_none").css("display","inline")}}}function getPublicationIds(a){var c=$("#"+a+"_ids").val();if(c==""){return new Array()}else{ids_array=c.split(",");for(var b=0;b<ids_array.length;b++){ids_array[b]=parseInt(ids_array[b])}return ids_array}}function showPublication(c,a,g,f,h){var e=document.createElement("img");e.className="famfamfam delete_button";e.setAttribute("alt","remove this publication");e.setAttribute("src",baseUrl+"/plugins/famfamfam-1.0.1/images/icons/delete.png");e.onclick=function(){removePublication(c,a);return false};var b=document.createElement("div");b.className="title";b.appendChild(document.createTextNode(g));var d=document.createElement("div");d.className="authors";d.appendChild(document.createTextNode(f));var i=document.createElement("li");i.setAttribute("id",c+"_item_"+a);i.className=h%2==0?"even":"odd";i.appendChild(e);i.appendChild(b);i.appendChild(d);$("#"+c+"_list").append(i)}function createPublicationDialog(a){if($("."+a+"_publication_dialog").length==0){$("#"+a+"_dialog").dialog({title:"Add publication",autoOpen:false,width:800,height:400,modal:true,dialogClass:a+"_publication_dialog",position:"center",buttons:{Add:function(){addPublication(a);$(this).dialog("close")},Close:function(){$(this).dialog("close")}},close:function(){}}).width(790).height(400)}else{$("#"+a+"_dialog").remove()}}function openPublicationDialog(a){var b=$("#"+a);b.autocomplete("close");b.val("");$("#"+a+"_dialog").dialog("open");b.focus();enableButton("."+a+"_publication_dialog","Add",false)}function getDialogButton(b,a){var e=$(b+" .ui-dialog-buttonpane button");for(var d=0;d<e.length;++d){var c=$(e[d]);if(c.text()==a){return c}}return null}function enableButton(b,a,c){var d=getDialogButton(b,a);if(d){if(c){d.attr("disabled","");d.removeClass("ui-state-disabled")}else{d.attr("disabled","disabled");d.addClass("ui-state-disabled")}}}function addContact(b){var e=$("#"+b+"_person").val();var a=$("#"+b+"_role").val();if(e==""||e==0||a==""||a==0){alert("Please select both a person and a role.");return false}var c=e+"-"+a;var d=getContactIds(b);if($.inArray(c,d)==-1){d[d.length]=c;$("#"+b+"_ids").val(d.join(","));showContact(b,c,$("#"+b+"_person  :selected").text(),$("#"+b+"_role :selected").text(),d.length-1);$("#"+b+"_none").css("display","none")}return true}function removeContact(b,c){var d=getContactIds(b);if($.inArray(c,d)!=-1){d.splice($.inArray(c,d),1);$("#"+b+"_ids").val(d.join(","));var a=$("#"+b+"_item_"+c);if(a){a.remove()}if(d.length==0){$("#"+b+"_none").css("display","inline")}}}function getContactIds(a){var b=$("#"+a+"_ids").val();if(b==""){return new Array()}else{ids_array=b.split(",");return ids_array}}function showContact(c,a,d,f,h){var g=document.createElement("img");g.className="famfamfam delete_button";g.setAttribute("alt","remove this person");g.setAttribute("src",baseUrl+"/plugins/famfamfam-1.0.1/images/icons/delete.png");g.onclick=function(){removeContact(c,a);return false};var b=document.createElement("div");b.className="person";b.appendChild(document.createTextNode(d));var e=document.createElement("div");e.className="role";e.appendChild(document.createTextNode(f));var i=document.createElement("li");i.setAttribute("id",c+"_item_"+a);i.className=h%2==0?"even":"odd";i.appendChild(g);i.appendChild(b);i.appendChild(e);$("#"+c+"_list").append(i)}function addUser(a){id=parseInt($("#"+a+"_form select").val());var b=getUserIds(a);if($.inArray(id,b)==-1){b[b.length]=id;$("#"+a+"_ids").val(b.join(","));showUser(a,id,$("#"+a+"_form select option:selected").text(),b.length-1);$("#"+a+"_none").css("display","none")}return false}function removeUser(b,d){var c=getUserIds(b);if($.inArray(d,c)!=-1){c.splice($.inArray(d,c),1);$("#"+b+"_ids").val(c.join(","));var a=$("#"+b+"_item_"+d);if(a){a.remove()}if(c.length==0){$("#"+b+"_none").css("display","inline")}}}function getUserIds(a){var c=$("#"+a+"_ids").val();if(c==""){return new Array()}else{ids_array=c.split(",");for(var b=0;b<ids_array.length;b++){ids_array[b]=parseInt(ids_array[b])}return ids_array}}function showUser(c,g,f,d){var b=document.createElement("img");b.className="famfamfam delete_button";b.setAttribute("alt","remove this user");b.setAttribute("src",baseUrl+"/plugins/famfamfam-1.0.1/images/icons/delete.png");b.onclick=function(){removeUser(c,g);return false};var e=document.createElement("div");e.className="username";e.appendChild(document.createTextNode(f));var a=document.createElement("li");a.setAttribute("id",c+"_item_"+g);a.className=d%2==0?"even":"odd";a.appendChild(b);a.appendChild(e);$("#"+c+"_list").append(a)}function createUserDialog(a){if($("."+a+"_user_dialog").length==0){$("#"+a+"_dialog").dialog({title:"Add user",autoOpen:false,width:800,height:400,modal:true,dialogClass:a+"_user_dialog",position:"center",buttons:{Add:function(){addUser(a);$(this).dialog("close")},Close:function(){$(this).dialog("close")}},close:function(){}}).width(790).height(400)}else{$("#"+a+"_dialog").remove()}}function openUserDialog(a){var b=$("#"+a);b.val("");$("#"+a+"_dialog").dialog("open");b.focus()};