diff --git a/e107_admin/header.php b/e107_admin/header.php index 7e084b64d..d7d10ff02 100644 --- a/e107_admin/header.php +++ b/e107_admin/header.php @@ -76,9 +76,11 @@ function loadJSAddons() e107::js('core', 'password/jquery.pwdMeter.js', 'jquery', 2); - - e107::js("core", "tags/jquery.tagit.js","jquery",3); - e107::css('core', 'tags/jquery.tagit.css', 'jquery'); + // e107::css('core', 'bootstrap-tag/bootstrap-tag.css', 'jquery'); + e107::js('core', 'bootstrap-tag/bootstrap-tag.js', 'jquery', 2); + +// e107::js("core", "tags/jquery.tagit.js","jquery",3); +// e107::css('core', 'tags/jquery.tagit.css', 'jquery'); e107::css('core', 'core/admin.jquery.css', 'jquery'); e107::js("core", "core/admin.jquery.js","jquery",4); // Load all default functions. diff --git a/e107_themes/bootstrap/admin_style.css b/e107_themes/bootstrap/admin_style.css index b99c9cdfe..e13249675 100644 --- a/e107_themes/bootstrap/admin_style.css +++ b/e107_themes/bootstrap/admin_style.css @@ -758,6 +758,28 @@ ul#e-latest { line-height:17px } ul#e-latest li a span.badge { float:right; } ul#e-latest li a:hover { text-decoration: none; } +/* Bootstrap tags */ +.tags { + display: inline-block; +} + +.tag { + margin-right:5px; + display: inline-block; + float: none; + margin-left: 0; + vertical-align:top; + margin-top:3px; + +} + +span.tag button.close { + float: none; + padding-left:5px; +} + + + /* body { background-color: rgb(68, 68, 68); } diff --git a/e107_web/js/bootstrap-tag/bootstrap-tag.js b/e107_web/js/bootstrap-tag/bootstrap-tag.js new file mode 100644 index 000000000..7c54becfe --- /dev/null +++ b/e107_web/js/bootstrap-tag/bootstrap-tag.js @@ -0,0 +1,193 @@ +/* ========================================================== + * bootstrap-tag.js v2.2.2 + * https://github.com/fdeschenes/bootstrap-tag + * ========================================================== + * Copyright 2012 Francois Deschenes. + * + * 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. + * ========================================================== */ + +// https://github.com/soliantconsulting/tagmanager/blob/master/tagmanager.js + +!function ( $ ) { + + 'use strict' // jshint ;_; + + var Tag = function ( element, options ) { + this.element = $(element) + this.options = $.extend(true, {}, $.fn.tag.defaults, options) + this.values = $.grep($.map(this.element.val().split(','), $.trim), function ( value ) { return value.length > 0 }) + this.show() + } + + Tag.prototype = { + constructor: Tag + + , show: function () { + var that = this + + that.element.parent().prepend(that.element.detach().attr('type', 'hidden')) + that.element + .wrap($('