src/hdalab/templates/renkan_edit.html
changeset 627 3fd558fa38b1
parent 620 f45d7494332e
child 647 37220b1a35e2
equal deleted inserted replaced
626:af0a09405398 627:3fd558fa38b1
     8 {{block.super}}
     8 {{block.super}}
     9         <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/ui-lightness/jquery-ui-1.10.4.min.css' %}" />
     9         <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/ui-lightness/jquery-ui-1.10.4.min.css' %}" />
    10         <link rel="stylesheet" type="text/css" href="{% static 'renkanmanager/lib/renkan/css/renkan.css' %}" />
    10         <link rel="stylesheet" type="text/css" href="{% static 'renkanmanager/lib/renkan/css/renkan.css' %}" />
    11         <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/additionnal_renkan.css' %}" />
    11         <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/additionnal_renkan.css' %}" />
    12         <link rel="stylesheet" type="text/css" href="{% static 'hdalab/lib/bjqs.css' %}" />
    12         <link rel="stylesheet" type="text/css" href="{% static 'hdalab/lib/bjqs.css' %}" />
       
    13         <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
    13 {% endblock %}
    14 {% endblock %}
    14 
    15 
    15 {% block js_import %}
    16 {% block js_import %}
    16 {{block.super}}
    17 {{block.super}}
    17         <script src="{% static 'hdalab/lib/bjqs-1.3.min.js' %}"></script>
    18         <script src="{% static 'hdalab/lib/bjqs-1.3.min.js' %}"></script>
    31         <script src="{% static 'hdalab/js/renkan-manual-save.js' %}"></script>
    32         <script src="{% static 'hdalab/js/renkan-manual-save.js' %}"></script>
    32         <script src="{% static 'hdalab/js/hdalab-renkan-bins.js' %}"></script>
    33         <script src="{% static 'hdalab/js/hdalab-renkan-bins.js' %}"></script>
    33         <script type="text/javascript">
    34         <script type="text/javascript">
    34             var io_options = {}, dialog=false, _rkn;
    35             var io_options = {}, dialog=false, _rkn;
    35             _.extend(Rkns.i18n.fr, {"Search in Bins": "Rechercher dans les résultats"});
    36             _.extend(Rkns.i18n.fr, {"Search in Bins": "Rechercher dans les résultats"});
    36            	function startRenkan(){
    37             function startRenkan(){
    37                 var _renkan = new Rkns.Renkan({
    38                 var _renkan = new Rkns.Renkan({
    38                     manual_save: true,
    39                     manual_save: true,
    39                     show_user_list: false,
    40                     show_user_list: false,
    40                     user_color_editable: false,
    41                     user_color_editable: false,
    41                     user_name_editable: false,
    42                     user_name_editable: false,
    44                     show_addedge_button:false,
    45                     show_addedge_button:false,
    45                     static_url : "{% static 'renkanmanager/lib/renkan/' %}",
    46                     static_url : "{% static 'renkanmanager/lib/renkan/' %}",
    46                     allow_image_upload : false,
    47                     allow_image_upload : false,
    47                     default_view: false,
    48                     default_view: false,
    48                     save_view: true,
    49                     save_view: true,
       
    50                     hide_nodes: false,
       
    51                     show_node_editor_description_richtext: false,
    49                     search: [
    52                     search: [
    50                         {
    53                         {
    51                             type: "HdaTags",
    54                             type: "HdaTags",
    52                             lang: "{{LANGUAGE_CODE}}",
    55                             lang: "{{LANGUAGE_CODE}}",
    53                             image: "http://dbpedia.org/statics/dbpedia_logo.png",
    56                             image: "http://dbpedia.org/statics/dbpedia_logo.png",
    85 
    88 
    86                 //_create_user_//
    89                 //_create_user_//
    87 
    90 
    88                 //_____________//
    91                 //_____________//
    89                 io_options = {
    92                 io_options = {
    90                 		url: "{% url 'renkan_get_put' %}" + window.location.search,
    93                         url: "{% url 'renkan_get_put' %}" + window.location.search,
    91                 		{% if user.is_authenticated %}
    94                         {% if user.is_authenticated %}
    92                 			user_authenticated: true,
    95                             user_authenticated: true,
    93                         	user_id:"{{ user.id }}",
    96                             user_id:"{{ user.id }}",
    94                         	user_name:"{{ user }}",
    97                             user_name:"{{ user }}",
    95                 		{% else %}
    98                         {% else %}
    96                         	user_authenticated: false,
    99                             user_authenticated: false,
    97                         {% endif %}
   100                         {% endif %}
    98                 };
   101                 };
    99                 Rkns.jsonIOSaveOnClick(_renkan, io_options);
   102                 Rkns.jsonIOSaveOnClick(_renkan, io_options);
   100 
   103 
   101                 _rkn = _renkan;
   104                 _rkn = _renkan;
   107                 dialog = $( "#dialog-form" ).dialog({
   110                 dialog = $( "#dialog-form" ).dialog({
   108                     autoOpen: false,
   111                     autoOpen: false,
   109                     width: 520,
   112                     width: 520,
   110                     modal: true,
   113                     modal: true,
   111                     create: function (event, ui) {
   114                     create: function (event, ui) {
   112                     	$("#login-popup-close").click(function(){
   115                         $("#login-popup-close").click(function(){
   113 			    			dialog.dialog("close");
   116                             dialog.dialog("close");
   114 			            });
   117                         });
   115                     }
   118                     }
   116                 });
   119                 });
   117 
   120 
   118                 function manageLoginForm(e, form){
   121                 function manageLoginForm(e, form){
   119                     e.preventDefault();
   122                     e.preventDefault();
   140                             // in case, login failed, we reassign the behaviour
   143                             // in case, login failed, we reassign the behaviour
   141                             form = dialog.find( "form" ).on( "submit", function( event ) {
   144                             form = dialog.find( "form" ).on( "submit", function( event ) {
   142                                 manageLoginForm(event, this);
   145                                 manageLoginForm(event, this);
   143                             });
   146                             });
   144                             $("#login-popup-close").click(function(){
   147                             $("#login-popup-close").click(function(){
   145     			    			dialog.dialog("close");
   148                                 dialog.dialog("close");
   146     			            });
   149                             });
   147                         }
   150                         }
   148                     });
   151                     });
   149                 }
   152                 }
   150 
   153 
   151 			    form = dialog.find( "form" ).on( "submit", function( event ) {
   154                 form = dialog.find( "form" ).on( "submit", function( event ) {
   152 			        manageLoginForm(event, this);
   155                     manageLoginForm(event, this);
   153 			    });
   156                 });
   154 
   157 
   155 			  //help dialog init
   158               //help dialog init
   156 			    var help_dialog = $( "#help-container" ).dialog({
   159                 var help_dialog = $( "#help-container" ).dialog({
   157 			        autoOpen: false,
   160                     autoOpen: false,
   158 			        height: 330,
   161                     height: 330,
   159 			        width: 880,
   162                     width: 880,
   160 			        resizable: false,
   163                     resizable: false,
   161 			        draggable: false,
   164                     draggable: false,
   162 			        create: function (event, ui) {
   165                     create: function (event, ui) {
   163 			        	var help_slideshow = $('#help-slideshow').bjqs({
   166                         var help_slideshow = $('#help-slideshow').bjqs({
   164 					    	responsive:false,
   167                             responsive:false,
   165 					    	height: 320,
   168                             height: 320,
   166 					        width: 870,
   169                             width: 870,
   167 					    	animtype: 'slide',
   170                             animtype: 'slide',
   168 					    	showcontrols: true,
   171                             showcontrols: true,
   169 					    	centercontrols: false,
   172                             centercontrols: false,
   170 					     	nexttext: "",
   173                              nexttext: "",
   171 					     	prevtext: "",
   174                              prevtext: "",
   172 					     	showmarkers : false,
   175                              showmarkers : false,
   173 					     	automatic: false
   176                              automatic: false
   174 					    });
   177                         });
   175 
   178 
   176 			        	$("#toggle-help").click(function(){
   179                         $("#toggle-help").click(function(){
   177 			        		if (help_dialog.dialog("isOpen")){
   180                             if (help_dialog.dialog("isOpen")){
   178 			        			help_dialog.dialog("close");
   181                                 help_dialog.dialog("close");
   179 			        		}
   182                             }
   180 			        		else{
   183                             else{
   181 			        			help_dialog.dialog("open");
   184                                 help_dialog.dialog("open");
   182 			        		}
   185                             }
   183 			            });
   186                         });
   184 			    		$(".img-close").click(function(){
   187                         $(".img-close").click(function(){
   185 			    			help_dialog.dialog("close");
   188                             help_dialog.dialog("close");
   186 			            });
   189                         });
   187 			    	}
   190                     }
   188 			    });
   191                 });
   189         	});
   192             });
   190 
   193 
   191         </script>
   194         </script>
   192 {% endblock %}
   195 {% endblock %}
   193 
   196 
   194 {% block main_content %}
   197 {% block main_content %}
   195 <div class="all-title">
   198 <div class="all-title">
   196 	<h1><strong>RENKAN</strong></h1>
   199     <h1><strong>RENKAN</strong></h1>
   197 	<div class="renkan_help">
   200     <div class="renkan_help">
   198 		{% if switch_shape_url %}
   201         {% if switch_shape_url %}
   199 		<ul>
   202         <ul>
   200 			<li>
   203             <li>
   201 				{% trans 'Change organisation' %}
   204                 {% trans 'Change organisation' %}
   202 				<p> {% trans '(Indisponible si modification du RENKAN)' %}</p>
   205                 <p> {% trans '(Indisponible si modification du RENKAN)' %}</p>
   203 				<ul>
   206                 <ul>
   204 					{% if 'shape=vert' in switch_shape_url.current %}
   207                     {% if 'shape=vert' in switch_shape_url.current %}
   205 						<li id="graph-line"><a href="">&#10003&nbsp;{% trans 'View graph in column' %}</a></li>
   208                         <li id="graph-line"><a href="">&#10003&nbsp;{% trans 'View graph in column' %}</a></li>
   206 						<li id="graph-lineH"><a href="{{ switch_shape_url.horiz }}">&nbsp;&nbsp;&nbsp;{% trans 'View graph in line' %}</a></li>
   209                         <li id="graph-lineH"><a href="{{ switch_shape_url.horiz }}">&nbsp;&nbsp;&nbsp;{% trans 'View graph in line' %}</a></li>
   207 						<li id="graph-circle"><a href="{{ switch_shape_url.circle }}">&nbsp;&nbsp;&nbsp;{% trans 'View graph in circle' %}</a></li>
   210                         <li id="graph-circle"><a href="{{ switch_shape_url.circle }}">&nbsp;&nbsp;&nbsp;{% trans 'View graph in circle' %}</a></li>
   208 					{% elif 'shape=horiz' in switch_shape_url.current %}
   211                     {% elif 'shape=horiz' in switch_shape_url.current %}
   209 						<li id="graph-line"><a href="{{ switch_shape_url.vert }}">&nbsp;&nbsp;&nbsp;{% trans 'View graph in column' %}</a></li>
   212                         <li id="graph-line"><a href="{{ switch_shape_url.vert }}">&nbsp;&nbsp;&nbsp;{% trans 'View graph in column' %}</a></li>
   210 						<li id="graph-lineH"><a href="">&#10003&nbsp;{% trans 'View graph in line' %}</a></li>
   213                         <li id="graph-lineH"><a href="">&#10003&nbsp;{% trans 'View graph in line' %}</a></li>
   211 						<li id="graph-circle"><a href="{{ switch_shape_url.circle }}">&nbsp;&nbsp;&nbsp;{% trans 'View graph in circle' %}</a></li>
   214                         <li id="graph-circle"><a href="{{ switch_shape_url.circle }}">&nbsp;&nbsp;&nbsp;{% trans 'View graph in circle' %}</a></li>
   212 					{% else %}
   215                     {% else %}
   213 						<li id="graph-line"><a href="{{ switch_shape_url.vert }}">&nbsp;&nbsp;&nbsp;{% trans 'View graph in column' %}</a></li>
   216                         <li id="graph-line"><a href="{{ switch_shape_url.vert }}">&nbsp;&nbsp;&nbsp;{% trans 'View graph in column' %}</a></li>
   214 						<li id="graph-lineH"><a href="{{ switch_shape_url.horiz }}">&nbsp;&nbsp;&nbsp;{% trans 'View graph in line' %}</a></li>
   217                         <li id="graph-lineH"><a href="{{ switch_shape_url.horiz }}">&nbsp;&nbsp;&nbsp;{% trans 'View graph in line' %}</a></li>
   215 						<li id="graph-circle"><a href="">&#10003&nbsp;{% trans 'View graph in circle' %}</a></li>
   218                         <li id="graph-circle"><a href="">&#10003&nbsp;{% trans 'View graph in circle' %}</a></li>
   216 					{% endif %}
   219                     {% endif %}
   217 				</ul>
   220                 </ul>
   218 			</li>
   221             </li>
   219 		</ul>
   222         </ul>
   220 		{% endif %}
   223         {% endif %}
   221 		<a id="toggle-help" href="#"></a>
   224         <a id="toggle-help" href="#"></a>
   222 	</div>
   225     </div>
   223 </div>
   226 </div>
   224 <div id="dialog-form" title="Identification">
   227 <div id="dialog-form" title="Identification">
   225 	{% include 'ajax_identification/ajax_login.html' %}
   228     {% include 'ajax_identification/ajax_login.html' %}
   226 </div>
   229 </div>
   227 
   230 
   228 <div id="help-container" class="">
   231 <div id="help-container" class="">
   229 	{% include 'help_popup.html' %}
   232     {% include 'help_popup.html' %}
   230 </div>
   233 </div>
   231 
   234 
   232 <div class="rnk-wrapper">
   235 <div class="rnk-wrapper">
   233   <div class="rnk-container">
   236   <div class="rnk-container">
   234     <div id="renkan"></div>
   237     <div id="renkan"></div>