Merge with abd73d06615e1dc427783e9dfa1d2ea4cf50eff7
authorcavaliet
Thu, 12 Sep 2013 11:42:29 +0200
changeset 73 d1b176885515
parent 72 dd1d59471697 (current diff)
parent 71 abd73d06615e (diff)
child 74 ad7d84868c98
child 79 d585f6b46b88
Merge with abd73d06615e1dc427783e9dfa1d2ea4cf50eff7
src/p4l/static/p4l/css/p4l.css
src/p4l/static/p4l/templates/imprintDisp.html
src/p4l/static/p4l/templates/volumeIssueForm.html
src/p4l/templates/p4l/p4l_home.html
Binary file src/p4l/static/p4l/css/img/ajax-loader.gif has changed
--- a/src/p4l/static/p4l/css/p4l.css	Wed Sep 11 15:52:30 2013 +0200
+++ b/src/p4l/static/p4l/css/p4l.css	Thu Sep 12 11:42:29 2013 +0200
@@ -36,7 +36,15 @@
 	-ms-transform:rotate(90deg);
 	-webkit-transform:rotate(90deg);
 }
-
+.spinner {
+    width: 14px;
+    height: 14px;
+    float: left;
+	background:url(./img/ajax-loader.gif) no-repeat center center;
+	border-radius: 50%;
+	opacity: .7;
+	margin-right: 4px;
+}
 /* Flags */
 
 .flag {
--- a/src/p4l/static/p4l/js/p4l.js	Wed Sep 11 15:52:30 2013 +0200
+++ b/src/p4l/static/p4l/js/p4l.js	Thu Sep 12 11:42:29 2013 +0200
@@ -235,10 +235,13 @@
 app.controller("RecordCtrl", function($scope, RecordModel, context){
     
     $scope.record = RecordModel.record;
-    $scope.uriLabels = RecordModel.uriLabels;    
+    $scope.uriLabels = RecordModel.uriLabels;
+    
+    $scope.saving = false;
         
     $scope.submitRecord = function() {
-        $scope.record.$save({recordId: context.record_id});
+        $scope.saving = true;
+        $scope.record.$save({recordId: context.record_id}).then(function(response) { $scope.saving=false;});
     }
     
     
--- a/src/p4l/static/p4l/templates/imprintDisp.html	Wed Sep 11 15:52:30 2013 +0200
+++ b/src/p4l/static/p4l/templates/imprintDisp.html	Thu Sep 12 11:42:29 2013 +0200
@@ -1,6 +1,6 @@
-<ul class="list-unstyled">
-    <li>{{'City'|translate}} : {{ obj.imprintCity }}</li>
-    <li>{{'Publisher'|translate}} : {{ obj.publisher }}</li>
-    <li>{{'Date'|translate}} : {{ obj.imprintDate }}</li>
-    <li>{{'Language'|translate}} : {{ obj.lang }}</li>
-</ul>
+<tr>
+    <td>{{ obj.imprintCity }}</td>
+    <td>{{ obj.publisher }}</td>
+    <td>{{ obj.imprintDate }}</td>
+    <td>{{ obj.lang }}</td>
+</tr>
\ No newline at end of file
--- a/src/p4l/static/p4l/templates/volumeIssueForm.html	Wed Sep 11 15:52:30 2013 +0200
+++ b/src/p4l/static/p4l/templates/volumeIssueForm.html	Thu Sep 12 11:42:29 2013 +0200
@@ -1,6 +1,6 @@
  <form class="well span6">
     <div class="span3 row">
-     <label for="imprint-volume-{{$id}}">{{'Volume'|translate}}</label><input type="text" placeholder="{{'Volume'|translate}}" ng_model="editedObj.imprintvolume" name="imprintvolume" id="imprint-volume-{{$id}}" class="span3"/>
+     <label for="imprint-volume-{{$id}}">{{'Volume'|translate}}</label><input type="text" placeholder="{{'Volume'|translate}}" ng_model="editedObj.volume" name="volume" id="imprint-volume-{{$id}}" class="span3"/>
      <label for="imprint-number-{{$id}}">{{'Number'|translate}}</label><input type="text" placeholder="{{'Number'|translate}}" ng_model="editedObj.number" name="number" id="imprint-number-{{$id}}" class="span3"/>
      </div>
      <div class="span3 row">
--- a/src/p4l/templates/p4l/p4l_home.html	Wed Sep 11 15:52:30 2013 +0200
+++ b/src/p4l/templates/p4l/p4l_home.html	Thu Sep 12 11:42:29 2013 +0200
@@ -36,16 +36,16 @@
 {% endif %}
 <table class="table">
   <thead>
-    <tr><td>URI</td><td>lang.</td><td>{% trans 'titles' %}</td><td class="two_buttons">{% trans 'actions' %}</td></tr>
+    <tr><td>{% trans 'identifier' %}</td><td>{% trans 'titles' %}</td><td>{% trans 'dates' %} (années imprint)</td><td class="two_buttons">{% trans 'actions' %}</td></tr>
   </thead>
   <tbody>
   {% for record in object_list %}
     <tr>
-      <td title="{{ record.uri }}">{{ record.uri|reduce:"4,13" }}</td>
-      <td title="{{ record.language.uri }}">{{ record.language.uri|reduce:"0,3" }}</td>
+      <td>{{ record.identifier }}</td>
       <td><ul>{% for t in record.titles.all %}
           <li>{{ t.title }}</li>
           {% endfor %}</ul></td>
+      <td>&nbsp;</td>
       <td>
         <a class="btn btn-default" href="{% url 'p4l_record_view' slug=record.identifier %}"><i class="glyphicon glyphicon-eye-open"></i></a>
         <a class="btn btn-default" href="{% url 'p4l_record_edit' slug=record.identifier %}"><i class="glyphicon glyphicon-pencil"></i></a>
--- a/src/p4l/templates/p4l/record_update_form.html	Wed Sep 11 15:52:30 2013 +0200
+++ b/src/p4l/templates/p4l/record_update_form.html	Thu Sep 12 11:42:29 2013 +0200
@@ -178,7 +178,10 @@
     </tr>
   </tbody>
 </table>
-<button ng-click="submitRecord()">{{ 'Save' | translate }}</button>
+<button type="button" class="btn btn-primary" ng-click="submitRecord()" id="record-submit">
+    <span ng-class="['glyphicon', saving?'spinner':'glyphicon-save']"></span>
+    <span>{{ 'Save' | translate }}</span>
+</button>
 </div>
 {% endverbatim %}
 {% endblock %}
\ No newline at end of file