Browse Source

Evolution #357: Maj interface d'ajout

Sevajol Bastien 12 years ago
parent
commit
41653439f0
2 changed files with 17 additions and 7 deletions
  1. 1 1
      web/bundles/muzichcore/css/main.css
  2. 16 6
      web/bundles/muzichcore/js/muzich.js

+ 1 - 1
web/bundles/muzichcore/css/main.css View File

@@ -1005,7 +1005,7 @@ input#element_add_url
1005 1005
 
1006 1006
 input#element_add_name
1007 1007
 {
1008
-  width: 65%;
1008
+  width: 100%;
1009 1009
   font-size: 110%;
1010 1010
   font-weight: bold;
1011 1011
 }

+ 16 - 6
web/bundles/muzichcore/js/muzich.js View File

@@ -1132,6 +1132,7 @@ $(document).ready(function(){
1132 1132
         $('a#element_add_link').show();
1133 1133
       }
1134 1134
       
1135
+      return true;
1135 1136
     }
1136 1137
     else if (response.status == 'error')
1137 1138
     {
@@ -1144,7 +1145,11 @@ $(document).ready(function(){
1144 1145
       }
1145 1146
       
1146 1147
       $('form[name="add"]').prepend(ul_errors);
1148
+      
1149
+      return false;
1147 1150
     }
1151
+    
1152
+    return false;
1148 1153
   }
1149 1154
 
1150 1155
   // Ajout d'un element #ajouter (première partie)
@@ -1265,13 +1270,18 @@ $(document).ready(function(){
1265 1270
     }
1266 1271
     
1267 1272
     $('form[name="add"] img.tag_loader').hide();
1268
-    element_add_proceed_json_response(response);
1269 1273
     
1270
-    $('div#element_add_box').slideUp();
1271
-    $('div#form_add_first_part').show();
1272
-    $('div#form_add_second_part').hide();
1273
-    $('ul#form_add_prop_tags').hide();
1274
-    $('ul#form_add_prop_tags_text').hide();
1274
+    if (element_add_proceed_json_response(response))
1275
+    { 
1276
+      $('div#element_add_box').slideUp();
1277
+      $('div#form_add_first_part').show();
1278
+      $('div#form_add_second_part').hide();
1279
+      $('ul#form_add_prop_tags').hide();
1280
+      $('ul#form_add_prop_tags_text').hide();
1281
+      $('input#element_add_url').val('');
1282
+      $('input#element_add_name').val('');
1283
+    }
1284
+
1275 1285
     
1276 1286
     return false;
1277 1287
   });