Kaynağa Gözat

[closes #156] added select2 for timezone dropdown in user edit modale

Come 7 yıl önce
ebeveyn
işleme
0949627047

+ 1 - 0
tracim/tracim/public/assets/js/main.js Dosyayı Görüntüle

@@ -13,4 +13,5 @@ $(document).ready(function () {
13 13
       }
14 14
     })
15 15
   }
16
+
16 17
 })

+ 6 - 0
tracim/tracim/templates/user_edit_me.mak Dosyayı Görüntüle

@@ -5,3 +5,9 @@
5 5
 
6 6
 ${FORMS.USER_EDIT_FORM('user-edit-form', result.user, tg.url('/user/{}?_method=PUT'.format(result.user.id)), next_url=fake_api.next_url)}
7 7
 
8
+<script type="text/javascript">
9
+  // add select2 for timezone in user edit profile modale
10
+  $('#timezone').select2({
11
+    dropdownParent: $("#user-edit-form") // this is a workaround to make select works inside bootstrap modal
12
+  })
13
+</script>

+ 2 - 2
tracim/tracim/templates/user_workspace_forms.mak Dosyayı Görüntüle

@@ -57,7 +57,7 @@
57 57
                 <span class="pull-right t-modal-form-submit-button">
58 58
                     <button id="${dom_id}-submit-button" type="submit" class="btn btn-small btn-success" title="${_('Create this page')}"><i class=" fa fa-check"></i> ${_('Validate')}</button>
59 59
                 </span>
60
-                
60
+
61 61
                 <div style="clear: both;"></div>
62 62
             </form>
63 63
         </div>
@@ -80,7 +80,7 @@
80 80
                 <span class="pull-right t-modal-form-submit-button">
81 81
                     <button id="${dom_id}-submit-button" type="submit" class="btn btn-small btn-success" title="${_('Create this page')}"><i class=" fa fa-check"></i> ${_('Validate')}</button>
82 82
                 </span>
83
-                
83
+
84 84
                 <div style="clear: both;"></div>
85 85
             </form>
86 86
         </div>