[PATCH] [Wok 0/2] Enhancements and new library

From: Samuel Guimarães <sguimaraes943@gmail.com> The first patch includes jquery.containsNC pseudo-selector for jQuery functions. This is required in order to fix Kimchi issue #809. The second patch includes an enhancement in Wok login page, fixing Wok logos in small screens. Wok will render up to three logos per row below the login panel instead of only two. Samuel Guimarães (2): Added jquery.containsNC to enable case insensitive pseudo-selector in JS Fixed wok logos in small screen resolutions configure.ac | 1 + ui/css/bootstrap.custom.css | 6 +++--- ui/css/src/modules/_login.scss | 3 +-- ui/css/wok.css | 5 ++--- ui/libs/Makefile.am | 2 +- ui/libs/jquery-containsNC/LICENSE | 21 +++++++++++++++++++++ ui/libs/jquery-containsNC/Makefile.am | 22 ++++++++++++++++++++++ ui/libs/jquery-containsNC/jquery.containsNC.js | 3 +++ ui/pages/wok-ui.html.tmpl | 1 + 9 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 ui/libs/jquery-containsNC/LICENSE create mode 100644 ui/libs/jquery-containsNC/Makefile.am create mode 100644 ui/libs/jquery-containsNC/jquery.containsNC.js -- 1.9.3

From: Samuel Guimarães <sguimaraes943@gmail.com> Signed-off-by: Samuel Guimarães <sguimaraes943@gmail.com> --- configure.ac | 1 + ui/libs/Makefile.am | 2 +- ui/libs/jquery-containsNC/LICENSE | 21 +++++++++++++++++++++ ui/libs/jquery-containsNC/Makefile.am | 22 ++++++++++++++++++++++ ui/libs/jquery-containsNC/jquery.containsNC.js | 3 +++ ui/pages/wok-ui.html.tmpl | 1 + 6 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 ui/libs/jquery-containsNC/LICENSE create mode 100644 ui/libs/jquery-containsNC/Makefile.am create mode 100644 ui/libs/jquery-containsNC/jquery.containsNC.js diff --git a/configure.ac b/configure.ac index 0a5ce80..8b35de6 100644 --- a/configure.ac +++ b/configure.ac @@ -128,6 +128,7 @@ AC_CONFIG_FILES([ ui/libs/bootstrap-switch/dist/Makefile ui/libs/bootstrap-switch/dist/js/Makefile ui/libs/bootstrap-switch/dist/css/Makefile + ui/libs/jquery-containsNC/Makefile ui/libs/bootstrap-editable/Makefile ui/libs/bootstrap-editable/dist/Makefile ui/libs/bootstrap-editable/dist/js/Makefile diff --git a/ui/libs/Makefile.am b/ui/libs/Makefile.am index c876b8b..c31bb1d 100644 --- a/ui/libs/Makefile.am +++ b/ui/libs/Makefile.am @@ -17,4 +17,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -SUBDIRS = bootstrap jquery jquery-ui bootstrap-select es5-shim jquery-i18n list-js jquery-bootgrid bootstrap-switch bootstrap-editable typeahead +SUBDIRS = bootstrap jquery jquery-ui bootstrap-select es5-shim jquery-i18n list-js jquery-bootgrid bootstrap-switch bootstrap-editable typeahead jquery-containsNC diff --git a/ui/libs/jquery-containsNC/LICENSE b/ui/libs/jquery-containsNC/LICENSE new file mode 100644 index 0000000..7c2c160 --- /dev/null +++ b/ui/libs/jquery-containsNC/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 friedolinfoerder + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/ui/libs/jquery-containsNC/Makefile.am b/ui/libs/jquery-containsNC/Makefile.am new file mode 100644 index 0000000..0381443 --- /dev/null +++ b/ui/libs/jquery-containsNC/Makefile.am @@ -0,0 +1,22 @@ +# +# Project Wok +# +# Copyright IBM Corp, 2015-2016 +# +# 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. + +containsncdir = $(datadir)/wok/ui/libs/jquery-containsNC + +dist_containsnc_DATA = $(wildcard *.js) $(NULL) diff --git a/ui/libs/jquery-containsNC/jquery.containsNC.js b/ui/libs/jquery-containsNC/jquery.containsNC.js new file mode 100644 index 0000000..6372285 --- /dev/null +++ b/ui/libs/jquery-containsNC/jquery.containsNC.js @@ -0,0 +1,3 @@ +jQuery.expr[":"].containsNC = function(elem, i, match) { + return (elem.textContent || elem.innerText || '').toLowerCase().indexOf((match[3] || '').toLowerCase()) > -1; +}; \ No newline at end of file diff --git a/ui/pages/wok-ui.html.tmpl b/ui/pages/wok-ui.html.tmpl index 694e5a4..4d56a24 100644 --- a/ui/pages/wok-ui.html.tmpl +++ b/ui/pages/wok-ui.html.tmpl @@ -71,6 +71,7 @@ <link rel="stylesheet" href="$href('css/wok.css')"> <script src="$href('libs/es5-shim/es5-shim.min.js')"></script> <script src="$href('libs/jquery/jquery.min.js')"></script> + <script src="$href('libs/jquery-containsNC/jquery.containsNC.js')"></script> <script src="$href('libs/jquery-ui/jquery-ui.min.js')"></script> <script src="$href('libs/jquery-ui/jquery-ui-i18n.min.js')"></script> <script src="$href('libs/jquery-i18n/jquery.i18n.min.js')"></script> -- 1.9.3

From: Samuel Guimarães <sguimaraes943@gmail.com> Signed-off-by: Samuel Guimarães <sguimaraes943@gmail.com> --- ui/css/bootstrap.custom.css | 6 +++--- ui/css/src/modules/_login.scss | 3 +-- ui/css/wok.css | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ui/css/bootstrap.custom.css b/ui/css/bootstrap.custom.css index 13869da..469872f 100644 --- a/ui/css/bootstrap.custom.css +++ b/ui/css/bootstrap.custom.css @@ -3460,9 +3460,9 @@ tbody.collapse.in { display: table-cell; } -.input-group-addon:not(:first-child):not(:last-child), -.input-group-btn:not(:first-child):not(:last-child), -.input-group .form-control:not(:first-child):not(:last-child) { +.input-group-addon:not(:first-child, :first-child, :first-child):not(:last-child, :last-child, :last-child), +.input-group-btn:not(:first-child, :first-child, :first-child):not(:last-child, :last-child, :last-child), +.input-group .form-control:not(:first-child, :first-child, :first-child):not(:last-child, :last-child, :last-child) { border-radius: 0; } diff --git a/ui/css/src/modules/_login.scss b/ui/css/src/modules/_login.scss index 24f10c8..7d494ac 100644 --- a/ui/css/src/modules/_login.scss +++ b/ui/css/src/modules/_login.scss @@ -22,8 +22,7 @@ padding-right: 0 !important; .col-lg-4 { - width: 45.714em; - width: 64rem; + width: 670px; text-align: center; float: none; margin: 90px auto 0 auto; diff --git a/ui/css/wok.css b/ui/css/wok.css index 6f45d39..e586ee5 100644 --- a/ui/css/wok.css +++ b/ui/css/wok.css @@ -120,8 +120,7 @@ body { } .login .content .container .col-lg-4 { - width: 45.714em; - width: 64rem; + width: 670px; text-align: center; float: none; margin: 90px auto 0 auto; @@ -1098,7 +1097,7 @@ input[type=radio].wok-radio + label { /* * Project Wok * -* Copyright IBM Corp, 2015-2016 +* Copyright IBM Corp, 2016 * * Code derived from Project Kimchi * -- 1.9.3
participants (2)
-
Aline Manera
-
sguimaraes943@gmail.com