Browse Source

Merge pull request #394 from Skylsmoi/master

Skylsmoi 7 years ago
parent
commit
154891ae14
No account linked to committer's email

+ 11 - 3
tracim/tracim/public/assets/css/dashboard.css View File

125
   font-size: 16px;
125
   font-size: 16px;
126
 }
126
 }
127
 .header__navbar__switch-mode.switch-work-mode {
127
 .header__navbar__switch-mode.switch-work-mode {
128
-    background-color: #eee;
129
-    color: #333;
128
+  background-color: #eee;
129
+  color: #333;
130
+}
131
+
132
+#move_folder_popup .sidebarleft {
133
+  border: 1px solid #ddd;
134
+  border-top-width: 0;
135
+}
136
+#move_folder_popup .sidebarleft__menu__item__link {
137
+  color: #333;
130
 }
138
 }
131
 
139
 
132
 /*
140
 /*
603
   color: #31708f;
611
   color: #31708f;
604
 }
612
 }
605
 .content__home__tab__content-unread {
613
 .content__home__tab__content-unread {
606
-    float: right;
614
+  float: right;
607
   margin-bottom: 15px;
615
   margin-bottom: 15px;
608
 }
616
 }
609
 
617
 

+ 14 - 1
tracim/tracim/public/assets/js/trad.js View File

14
 }
14
 }
15
 
15
 
16
 function __ (tradId) {
16
 function __ (tradId) {
17
-  return tracimJsTraduction[tradId][globalTracimLang]
17
+  const normalizedLang = (() => {
18
+    switch (globalTracimLang) { // @TODO - Côme - 2017/10/30 - need a more secure way to handle different langs
19
+      case 'fr':
20
+      case 'fr-fr':
21
+      case 'fr_FR':
22
+        return 'fr_FR';
23
+      case 'en':
24
+      case 'en_US':
25
+        return 'en_US';
26
+      default:
27
+        return 'en_US';
28
+    }
29
+  })()
30
+  return tracimJsTraduction[tradId][normalizedLang]
18
 }
31
 }

+ 1 - 1
tracim/tracim/templates/admin/workspace_getone.mak View File

53
         % if potential_new_user_nb<=0:
53
         % if potential_new_user_nb<=0:
54
             ${TITLE.H3(_('Members'), 'fa-user', 'workspace-members')}
54
             ${TITLE.H3(_('Members'), 'fa-user', 'workspace-members')}
55
         % else:
55
         % else:
56
-            ${TITLE.H3_WITH_BUTTON(fake_api.current_user, result.workspace, 'workspace-members', _('Members'), 'add-role-from-existing-user-form', _('add one...'), 'fa-user')}
56
+            ${TITLE.H3_WITH_BUTTON(fake_api.current_user, result.workspace, 'workspace-members', _('Members'), 'add-role-from-existing-user-form', _('add one...'), 'fa-user', 'btn btn-link')}
57
 
57
 
58
             <div id="add-role-from-existing-user-form" class="collapse col-sm-9">
58
             <div id="add-role-from-existing-user-form" class="collapse col-sm-9">
59
                 <div class="pod-inline-form">
59
                 <div class="pod-inline-form">

+ 2 - 2
tracim/tracim/templates/folder/forms.mak View File

51
                     <li role="presentation"><a href="#move-to-another-workspace" aria-controls="move-to-another-workspace" role="tab" data-toggle="tab">${_('to another workspace')}</a></li>
51
                     <li role="presentation"><a href="#move-to-another-workspace" aria-controls="move-to-another-workspace" role="tab" data-toggle="tab">${_('to another workspace')}</a></li>
52
                 </ul>
52
                 </ul>
53
                 <div class="tab-content">
53
                 <div class="tab-content">
54
-                    <div role="tabpanel" class="tab-pane active bg-primary" id="move-to-same-workspace"></div>
54
+                    <div role="tabpanel" class="tab-pane active" id="move-to-same-workspace"></div>
55
                     <%
55
                     <%
56
                       selected_id = 'workspace_{}__folder_{}'.format(item.workspace.id, item.folder.id if item.folder else '')
56
                       selected_id = 'workspace_{}__folder_{}'.format(item.workspace.id, item.folder.id if item.folder else '')
57
                       apiPath = tg.url('/workspaces/treeview_root')
57
                       apiPath = tg.url('/workspaces/treeview_root')
60
                       apiChildParameters = tg.url('', dict(ignore_id=item.id, allowed_content_types='folder'))
60
                       apiChildParameters = tg.url('', dict(ignore_id=item.id, allowed_content_types='folder'))
61
                     %>
61
                     %>
62
                     ${LEFT_MENU.TREEVIEW('move-to-same-workspace', apiPath, apiParameters, apiChildPath, apiChildParameters, 'True')}
62
                     ${LEFT_MENU.TREEVIEW('move-to-same-workspace', apiPath, apiParameters, apiChildPath, apiChildParameters, 'True')}
63
-                    <div role="tabpanel" class="tab-pane bg-primary" id="move-to-another-workspace"></div>
63
+                    <div role="tabpanel" class="tab-pane" id="move-to-another-workspace"></div>
64
                     <%
64
                     <%
65
                       apiPath = tg.url('/workspaces/treeview_root')
65
                       apiPath = tg.url('/workspaces/treeview_root')
66
                       apiParameters = tg.url('', dict(current_id=None, all_workspaces=1, folder_allowed_content_types='folder', ignore_id=item.id, ignore_workspace_id=item.workspace.id))
66
                       apiParameters = tg.url('', dict(current_id=None, all_workspaces=1, folder_allowed_content_types='folder', ignore_id=item.id, ignore_workspace_id=item.workspace.id))

+ 2 - 2
tracim/tracim/templates/pod.mak View File

64
             menubar:false,
64
             menubar:false,
65
             statusbar:true,
65
             statusbar:true,
66
             branding: false,
66
             branding: false,
67
-            plugins: [ "table", "image", "charmap", "fullscreen", "autolink", "colorpicker", "link", "code", "contextmenu"],
67
+            plugins: [ "table", "image", "charmap", "fullscreen", "autolink", "colorpicker", "link", "code", "contextmenu", "lists"],
68
             language: globalTracimLang === 'fr' ? 'fr_FR' : globalTracimLang, // tinymce does't accept en_US as language, it is its default value named 'en'
68
             language: globalTracimLang === 'fr' ? 'fr_FR' : globalTracimLang, // tinymce does't accept en_US as language, it is its default value named 'en'
69
             selector:'${selector}',
69
             selector:'${selector}',
70
             toolbar: [
70
             toolbar: [
71
-              "undo redo | bold italic underline strikethrough | link | bullist numlist outdent indent | table | charmap | styleselect | alignleft aligncenter alignright | fullscreen | customInsertImage | code",
71
+              "undo redo | bold italic underline strikethrough | link | bullist numlist | outdent indent | table | charmap | styleselect | alignleft aligncenter alignright | fullscreen | customInsertImage | code",
72
             ],
72
             ],
73
             contextmenu: "link",
73
             contextmenu: "link",
74
             link_context_toolbar: true,
74
             link_context_toolbar: true,

+ 2 - 2
tracim/tracim/templates/widgets/title.mak View File

7
         ${label}
7
         ${label}
8
     </h3>
8
     </h3>
9
 </%def>
9
 </%def>
10
-<%def name="H3_WITH_BUTTON(current_user, workspace, dom_id, label, action_dom_id='', action_label='', fa_icon='')">
10
+<%def name="H3_WITH_BUTTON(current_user, workspace, dom_id, label, action_dom_id='', action_label='', fa_icon='', custom_classes='')">
11
     <h3 id="${dom_id}">
11
     <h3 id="${dom_id}">
12
         ${ICON.FA('t-less-visible '+fa_icon) if fa_icon else ''}
12
         ${ICON.FA('t-less-visible '+fa_icon) if fa_icon else ''}
13
         ${label}
13
         ${label}
15
         ## Button is shown for contributors (or more), not for readers
15
         ## Button is shown for contributors (or more), not for readers
16
         % if h.user_role(current_user, workspace)>1:
16
         % if h.user_role(current_user, workspace)>1:
17
             % if action_dom_id and action_label:
17
             % if action_dom_id and action_label:
18
-                <small class="t-spacer-left">${BUTTON.DATA_TARGET_AS_TEXT(action_dom_id, action_label)}</small>
18
+                <small class="t-spacer-left">${BUTTON.DATA_TARGET_AS_TEXT(action_dom_id, action_label, custom_classes)}</small>
19
             % endif
19
             % endif
20
         % endif
20
         % endif
21
     </h3>
21
     </h3>