web/ldtplatform/templates/registration/login.html
changeset 522 7d6630fd287e
parent 338 631c0edee9ea
child 995 94f9d36371f6
equal deleted inserted replaced
521:20e7bb9d2d14 522:7d6630fd287e
     1 {% extends "registration/base.html" %}
     1 {% extends "registration/base.html" %}
     2 {% load i18n %}
     2 {% load i18n %}
     3 {% block js_declaration %}{{ block.super }}
     3 {% block js_declaration %}
     4     <script type="text/javascript">
     4 {{ block.super }}
     5         $(document).ready(function() {
       
     6             $("#login-form").validate();
       
     7             
       
     8             
       
     9             $('#mon_ajax').click(function(e) {
       
    10                 var url = "{% url project_api project_id='c8448f21-272d-11e1-876b-c8bcc896c290' emitter_format='.json' %}";
       
    11                 
       
    12                 var monjson = '{\
       
    13                         "annotations": [\
       
    14                             {\
       
    15                                 "type": "c_07BA1284-5F24-71A8-1EE2-423EED999B8A",\
       
    16                                 "type_title": "New cutting name if necessary",\
       
    17                                 "media": "briandepalma_scarfacedepalma",\
       
    18                                 "begin": 1600000,\
       
    19                                 "end": 2100000,\
       
    20                                 "content": {\
       
    21                                     "data": "new scar annot"\
       
    22                                 },\
       
    23                                 "tags": [ "json","dude" ]\
       
    24                             }\
       
    25                         ],\
       
    26                         "meta": {\
       
    27                             "creator": "John Doe",\
       
    28                             "created": "2011-09-10T09:12:58"\
       
    29                         }\
       
    30                     }';
       
    31                 var monjson2 = '{\
       
    32                         "annotations": [\
       
    33                             {\
       
    34                                 "type": "c_07BA1284-5F24-71A8-1EE2-423EED999B8A",\
       
    35                                 "type_title": "New cutting name if necessary",\
       
    36                                 "media": "briandepalma_scarfacedepalma",\
       
    37                                 "begin": 2400000,\
       
    38                                 "end": 3000000,\
       
    39                                 "content": {\
       
    40                                     "data": "ntm iam 2"\
       
    41                                 },\
       
    42                                 "tags": [ "jak" ]\
       
    43                             }\
       
    44                         ],\
       
    45                         "meta": {\
       
    46                             "creator": "John Doe",\
       
    47                             "created": "2011-09-10T09:12:58"\
       
    48                         }\
       
    49                     }';
       
    50                 
       
    51                 $.ajax({
       
    52                     url: url,
       
    53                     type: 'PUT',
       
    54                     contentType: 'application/json',
       
    55                     data: monjson,
       
    56                     // bug with jquery >= 1.5, "json" adds a callback so we don't specify dataType
       
    57                     //dataType: 'json',
       
    58                     success: function(json, textStatus, XMLHttpRequest) {
       
    59                         alert("success = " + json);
       
    60                     },
       
    61                     error: function(jqXHR, textStatus, errorThrown) {
       
    62                         alert("ERROR = " + jqXHR.responseText + ", " + errorThrown);
       
    63                     }
       
    64                 });
       
    65             });
       
    66             
       
    67         });
       
    68     </script>
       
    69 {% endblock %}
     5 {% endblock %}
    70 
     6 
    71 {% block css_import %}
     7 {% block css_import %}
    72 	{{ block.super }}
     8 	{{ block.super }}
    73 	<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldt.css" />
     9 	<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldt.css" />
   110             {% comment %}{{social_list|safe}}{% endcomment %}
    46             {% comment %}{{social_list|safe}}{% endcomment %}
   111             </ul>
    47             </ul>
   112             {% endif %}
    48             {% endif %}
   113             </div>
    49             </div>
   114         </div>
    50         </div>
   115         <p id="mon_ajax">clic ici</p>
       
   116 	</div> 
    51 	</div> 
   117 
    52 
   118 {% endblock %}
    53 {% endblock %}
   119 
    54 
   120 
    55