ソースを参照

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

Come 8 年 前
コミット
0949627047
共有3 個のファイルを変更した9 個の追加2 個の削除を含む
  1. 1 0
      tracim/tracim/public/assets/js/main.js
  2. 6 0
      tracim/tracim/templates/user_edit_me.mak
  3. 2 2
      tracim/tracim/templates/user_workspace_forms.mak

+ 1 - 0
tracim/tracim/public/assets/js/main.js ファイルの表示

13
       }
13
       }
14
     })
14
     })
15
   }
15
   }
16
+
16
 })
17
 })

+ 6 - 0
tracim/tracim/templates/user_edit_me.mak ファイルの表示

5
 
5
 
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)}
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 ファイルの表示

57
                 <span class="pull-right t-modal-form-submit-button">
57
                 <span class="pull-right t-modal-form-submit-button">
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>
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
                 </span>
59
                 </span>
60
-                
60
+
61
                 <div style="clear: both;"></div>
61
                 <div style="clear: both;"></div>
62
             </form>
62
             </form>
63
         </div>
63
         </div>
80
                 <span class="pull-right t-modal-form-submit-button">
80
                 <span class="pull-right t-modal-form-submit-button">
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>
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
                 </span>
82
                 </span>
83
-                
83
+
84
                 <div style="clear: both;"></div>
84
                 <div style="clear: both;"></div>
85
             </form>
85
             </form>
86
         </div>
86
         </div>