
The patch renames all the files used by user log to make it consistence to its new tab name. The "Settings" tab will be used to handle plugins management feature. This patch does not add anything new. The changes was to accomodate the files renaming. Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com> --- ui/config/tab-ext.xml | 4 +- ui/css/Makefile.am | 10 +- ui/css/src/{settings.scss => user-log.scss} | 2 +- ui/css/user-log.css | 159 +++++++++++++++++++++ ui/css/wok.css | 4 +- ui/js/wok.bootgrid.js | 6 +- ui/js/wok.user-log.js | 22 ++- ...-search.html.tmpl => user-log-search.html.tmpl} | 0 .../{settings.html.tmpl => user-log.html.tmpl} | 10 +- 9 files changed, 187 insertions(+), 30 deletions(-) rename ui/css/src/{settings.scss => user-log.scss} (98%) create mode 100644 ui/css/user-log.css rename ui/pages/tabs/{settings-search.html.tmpl => user-log-search.html.tmpl} (100%) rename ui/pages/tabs/{settings.html.tmpl => user-log.html.tmpl} (87%) diff --git a/ui/config/tab-ext.xml b/ui/config/tab-ext.xml index 348e13e..5780b96 100644 --- a/ui/config/tab-ext.xml +++ b/ui/config/tab-ext.xml @@ -4,8 +4,8 @@ <tab> <access role="admin" mode="admin"/> <access role="user" mode="none"/> - <title>Settings</title> + <title>Activity Log</title> <order>-1</order> - <path>tabs/settings.html</path> + <path>tabs/user-log.html</path> </tab> </tabs-ext> diff --git a/ui/css/Makefile.am b/ui/css/Makefile.am index a779e61..ea49ec8 100644 --- a/ui/css/Makefile.am +++ b/ui/css/Makefile.am @@ -1,7 +1,7 @@ # # Project Wok # -# Copyright IBM Corp, 2013-2016 +# Copyright IBM Corp, 2013-2017 # # Code derived from Project Kimchi # @@ -22,7 +22,7 @@ SUBDIRS = fontawesome opensans EXTRA_DIST = theme-default cssdir = $(datadir)/wok/ui/css -dist_css_DATA = theme-default.min.css jquery-ui.custom.css wok.css bootstrap.custom.css bootstrap-select.custom.css settings.css datatables.bootstrap.css +dist_css_DATA = $(wildcard *.css) wok: src/wok.scss src/modules/*.scss echo "Compiling .scss file $<" @@ -32,9 +32,9 @@ bootstrap: src/bootstrap.custom.scss echo "Compiling .scss file $<" sassc -s expanded $< bootstrap.custom.css -settings: src/settings.scss +user-log: src/user-log.scss echo "Compiling .scss file $<" - sassc -s expanded $< settings.css + sassc -s expanded $< user-log.css bootstrap-select: src/bootstrap-select.custom.scss echo "Compiling .scss file $<" @@ -44,7 +44,7 @@ datatables: src/datatables.bootstrap.scss echo "Compiling .scss file $<" sassc -s expanded $< datatables.bootstrap.css -css: wok bootstrap bootstrap-select settings datatables +css: wok bootstrap bootstrap-select user-log datatables theme-default.min.css: theme-default/*.css cat $^ > $@ diff --git a/ui/css/src/settings.scss b/ui/css/src/user-log.scss similarity index 98% rename from ui/css/src/settings.scss rename to ui/css/src/user-log.scss index 557605e..d829516 100644 --- a/ui/css/src/settings.scss +++ b/ui/css/src/user-log.scss @@ -1,7 +1,7 @@ /* * Project Wok * - * Copyright IBM Corp, 2016 + * Copyright IBM Corp, 2017 * * Code derived from Project Kimchi * diff --git a/ui/css/user-log.css b/ui/css/user-log.css new file mode 100644 index 0000000..cba4cc6 --- /dev/null +++ b/ui/css/user-log.css @@ -0,0 +1,159 @@ +/* + * Project Wok + * + * Copyright IBM Corp, 2017 + * + * Code derived from Project Kimchi + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * A partial implementation of the Ruby list functions from Compass: + * https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/f... + */ +/* + * A partial implementation of the Ruby constants functions from Compass: + * https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/f... + */ +/* + * A partial implementation of the Ruby display functions from Compass: + * https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_ex... + */ +#wok-root-container .accordion { + margin: 12px 20px 12px 60px; + padding-bottom: 18px; + border-bottom: 1px solid #eee; + overflow: visible; + clear: both; +} + +#wok-root-container .accordion:first-child { + margin-top: 24px; +} + +#wok-root-container .accordion > h3 { + margin: 0; + padding: 0; + font-size: 26px; + font-weight: 300; + height: 44px; + display: block; +} + +#wok-root-container .accordion > h3 a { + color: #3a393b; + text-decoration: none; + display: block; + padding: 6px 30px; + margin-left: -30px; + margin-right: -30px; +} + +#wok-root-container .accordion > h3 a span.accordion-icon { + margin-left: -52px; + vertical-align: middle; + display: inline-block; + font: normal normal normal 32px/1 FontAwesome; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + color: #3a393b; +} + +#wok-root-container .accordion > h3 a[aria-expanded="false"] span.accordion-icon:before { + content: "\f01a"; +} + +#wok-root-container .accordion > h3 a[aria-expanded="true"] span.accordion-icon:before { + content: "\f01b"; +} + +#wok-root-container .accordion > h3 a span.accordion-text { + margin-left: 23px; + display: inline-block; + vertical-align: middle; +} + +.wok div.modal-footer { + background-color: #d9182d; +} + +.wok .modal-body .nav-tabs > li.active > a, +.wok .modal-body .nav-tabs > li.active > a:hover, +.wok .modal-body .nav-tabs > li.active > a:focus { + border-color: -moz-use-text-color -moz-use-text-color #d9182d; +} + +.wok.modal .row.clearfix { + margin-left: -10px; + margin-right: -10px; +} + +.wok.modal .form-group.col-sm-6 { + padding-left: 10px; + padding-right: 10px; +} + +.action-group { + position: absolute; + z-index: 999; +} + +div#user-log-actions { + padding-top: 15px; +} + +.label { + display: inline-block; + vertical-align: middle; +} + +.bootgrid-table th > .column-header-anchor > .icon.fa { + right: 6px; + top: 4px; +} + +span.trim { + display: inline-block; + width: 100%; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + padding-right: 6px; +} + +.table > tbody > tr > td { + vertical-align: middle; +} + +.tooltip > .tooltip-inner { + font-weight: 400; + font-size: 12.5pt; + padding: 8px !important; + max-width: 420px !important; + text-align: left; +} + +.search { + margin: 0 !important; + width: 514px !important; +} + +.pagination .button { + font-weight: 600; + cursor: pointer; +} + +.pagination .disabled .button { + cursor: not-allowed; +} diff --git a/ui/css/wok.css b/ui/css/wok.css index f77b2af..ec269b5 100644 --- a/ui/css/wok.css +++ b/ui/css/wok.css @@ -1,7 +1,7 @@ /* * Project Wok * - * Copyright IBM Corp, 2015-2016 + * Copyright IBM Corp, 2015-2017 * * Code derived from Project Kimchi * @@ -1473,7 +1473,7 @@ input[type=radio].wok-radio + label { /* * Project Wok * -* Copyright IBM Corp, 2015-2016 +* Copyright IBM Corp, 2015-2017 * * Code derived from Project Kimchi * diff --git a/ui/js/wok.bootgrid.js b/ui/js/wok.bootgrid.js index 1a5a374..e2da393 100644 --- a/ui/js/wok.bootgrid.js +++ b/ui/js/wok.bootgrid.js @@ -1,5 +1,5 @@ /* - * Copyright IBM Corp, 2016 + * Copyright IBM Corp, 2016-2017 * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -74,10 +74,10 @@ wok.createBootgrid = function(opts) { navigation: navigation, rowSelect: false, formatters: { - "settings-user-log-app": function(column, row) { + "user-log-app": function(column, row) { return '<span class="label label-primary" style="background-color:' + wok.pluginsColor[row.app] + '">' + row.app + '</span> '; }, - "settings-user-log-message": function(column, row) { + "user-log-message": function(column, row) { return '<span class="trim" data-toggle="tooltip" data-placement="auto bottom" title="'+row.message+'">' +row.message+ '</span> '; }, }, diff --git a/ui/js/wok.user-log.js b/ui/js/wok.user-log.js index 560fbfa..80e67e1 100644 --- a/ui/js/wok.user-log.js +++ b/ui/js/wok.user-log.js @@ -1,5 +1,5 @@ /* - * Copyright IBM Corp, 2016 + * Copyright IBM Corp, 2016-2017 * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,18 +16,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -wok.initSettings = function() { +wok.initUserLog = function() { wok.opts_user_log = {}; wok.opts_user_log['id'] = 'user-log-content'; wok.opts_user_log['gridId'] = "user-log-grid"; wok.opts_user_log['loadingMessage'] = i18n['WOKSETT0007M']; - wok.initUserLog(); + wok.initUserLogContent(); }; -wok.initUserLogConfig = function() { - wok.listUserLogConfig(); -} - wok.listUserLogConfig = function() { var ulGrid = []; @@ -36,7 +32,7 @@ wok.listUserLogConfig = function() { gridFields = [{ "column-id": 'app', "converter": 'string', - "formatter": "settings-user-log-app", + "formatter": "user-log-app", "title": i18n['WOKSETT0001M'] }, { "column-id": 'user', @@ -73,7 +69,7 @@ wok.listUserLogConfig = function() { }, { "column-id": 'message', "converter": 'string', - "formatter": "settings-user-log-message", + "formatter": "user-log-message", "sortable": false, "width": "30%", "title": i18n['WOKSETT0006M'] @@ -133,11 +129,11 @@ wok.initUserLogConfigGridData = function() { }); }; -wok.initUserLog = function() { - $(".content-area", "#wokSettings").css("height", "100%"); - wok.initUserLogConfig(); +wok.initUserLogContent = function() { + $(".content-area", "#wokUserLog").css("height", "100%"); + wok.listUserLogConfig(); $('#advanced-search-button').on('click',function(){ - wok.window.open('tabs/settings-search.html'); + wok.window.open('tabs/user-log-search.html'); }); $("#download-button").on('click',function(){ diff --git a/ui/pages/tabs/settings-search.html.tmpl b/ui/pages/tabs/user-log-search.html.tmpl similarity index 100% rename from ui/pages/tabs/settings-search.html.tmpl rename to ui/pages/tabs/user-log-search.html.tmpl diff --git a/ui/pages/tabs/settings.html.tmpl b/ui/pages/tabs/user-log.html.tmpl similarity index 87% rename from ui/pages/tabs/settings.html.tmpl rename to ui/pages/tabs/user-log.html.tmpl index dde05c8..d45cbaf 100644 --- a/ui/pages/tabs/settings.html.tmpl +++ b/ui/pages/tabs/user-log.html.tmpl @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA <html> <head> - <link rel="stylesheet" type="text/css" href="$href('css/settings.css')"> + <link rel="stylesheet" type="text/css" href="$href('css/user-log.css')"> <script type="text/javascript" src="$href('js/wok.user-log.js')"></script> <script type="text/javascript" src="$href('js/wok.bootgrid.js')"></script> </head> @@ -33,11 +33,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA <body> <div id="wok-root-container" class="wok"> <div class="container"> - <div id="wokSettings" class="wok-settings"> + <div id="wokUserLog" class="wok-user-log"> <!-- User Log Panel --> <div class="panel-group content-area accordion" id="user-log-content-area-accordion" role="tablist" aria-multiselectable="true"> <h3> - <a role="button" aria-expanded="true" data-toggle="collapse" data-parent="#user-log-content-area-accordion" href="#user-log-content-area" aria-expanded="false" aria-controls="user-log-content-area" class=""> + <a role="button" data-toggle="collapse" data-parent="#user-log-content-area-accordion" href="#user-log-content-area" aria-expanded="true" aria-controls="user-log-content-area" class=""> <span class="accordion-icon"></span> <span class="accordion-text">$_("User Activity Log")</span> </a> @@ -59,13 +59,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA </div> </div> </div> + </div> </div> </div> <div id="modalWindow" class="modal fade settings-modal wok" tabindex="-1" role="dialog" aria-labelledby="settingsModalLabel" aria-hidden="true"> </div> + <script> - wok.initSettings(); + wok.initUserLog(); </script> </body> -- 2.9.3