Преглед изворни кода

HUE-3553 [home] Reset the directory name in the create directory modal

This also drops the floatlabel stuff.
Johan Ahlen пре 10 година
родитељ
комит
b1d79cc

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/jquery/plugins/floatlabels.min.js


+ 1 - 0
desktop/core/src/desktop/static/desktop/js/fileBrowser/hueFileEntry.js

@@ -512,6 +512,7 @@
         parentUuid: self.definition().uuid,
         name: name
       });
+      $('#newDirectoryName').val(null)
     }
   };
 

+ 0 - 6
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -3570,12 +3570,6 @@
     }
   };
 
-  ko.bindingHandlers.floatlabel = {
-    init: function (element, valueAccessor, allBindings) {
-      $(element).floatlabel();
-    }
-  };
-
   ko.bindingHandlers.niceScroll = {
     init: function (element, valueAccessor, allBindings) {
       var options = valueAccessor() || {};

+ 0 - 1
desktop/core/src/desktop/templates/common_header.mako

@@ -195,7 +195,6 @@ if USE_NEW_EDITOR.get():
   <script src="${ static('desktop/ext/js/jquery/plugins/jquery.placeholder.min.js') }"></script>
   <script src="${ static('desktop/ext/js/jquery/plugins/jquery.dataTables.1.8.2.min.js') }"></script>
   <script src="${ static('desktop/ext/js/jquery/plugins/jquery.nicescroll.min.js') }"></script>
-  <script src="${ static('desktop/ext/js/jquery/plugins/floatlabels.min.js') }"></script>
   <script src="${ static('desktop/js/jquery.datatables.sorting.js') }"></script>
   <script src="${ static('desktop/ext/js/bootstrap.min.js') }"></script>
   <script src="${ static('desktop/ext/js/bootstrap-better-typeahead.min.js') }"></script>

+ 6 - 2
desktop/core/src/desktop/templates/file_browser.mako

@@ -424,11 +424,15 @@ from desktop.views import _ko
     <div id="createDirectoryModal" data-keyboard="true" class="modal hide fade" tabindex="-1">
       <!-- ko with: activeEntry -->
       <form class="form-horizontal">
+        <div class="modal-header">
+          <button type="button" class="close" data-dismiss="modal" data-bind="click: function () { $('#newDirectoryName').val(null) }" aria-hidden="true">&times;</button>
+          <h3>${_('Create Directory')}</h3>
+        </div>
         <div class="modal-body ">
-          <input id="newDirectoryName" class="input large-as-modal" type="text" placeholder="${ _('Directory name') }" data-bind="floatlabel" />
+          <input id="newDirectoryName" class="input large-as-modal" type="text" placeholder="${ _('Directory name') }" />
         </div>
         <div class="modal-footer">
-          <input type="button" class="btn" data-dismiss="modal" value="${ _('Cancel') }">
+          <input type="button" class="btn" data-dismiss="modal" data-bind="click: function () { $('#newDirectoryName').val(null) }" value="${ _('Cancel') }">
           <input type="submit" class="btn btn-primary disable-feedback" value="${ _('Create') }" data-bind="click: function () { if ($('#newDirectoryName').val()) { $data.createDirectory($('#newDirectoryName').val()); $('#createDirectoryModal').modal('hide'); } }"/>
         </div>
       </form>

Неке датотеке нису приказане због велике количине промена