From f6078abf278b94902156f8914ff876e7884042d1 Mon Sep 17 00:00:00 2001 From: Joel Alphonso Date: Tue, 20 Jun 2017 15:27:58 -0400 Subject: [PATCH] compiled assets --- assets/dist/scripts/charcoal.admin.js | 22 ++++++++++++++++++++++ assets/dist/styles/charcoal.admin.css | 20 ++++++++++++++++---- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/assets/dist/scripts/charcoal.admin.js b/assets/dist/scripts/charcoal.admin.js index 1fb0f46596..416b029942 100644 --- a/assets/dist/scripts/charcoal.admin.js +++ b/assets/dist/scripts/charcoal.admin.js @@ -5724,6 +5724,7 @@ Charcoal.Admin.Property_Input_SelectPicker.prototype.create_select = function () this.init_selectize(); this.init_clipboard(); this.init_allow_update(); + this.init_allow_create(); var self = this; @@ -5742,6 +5743,7 @@ Charcoal.Admin.Property_Input_SelectPicker.prototype.create_select = function () // Enables the copy button this.copy_items = opts.data.copy_items || this.copy_items; this.allow_update = opts.data.allow_update || this.allow_update; + this.allow_create = opts.data.allow_create || this.allow_create; this.title = opts.data.title || this.title; this.translations = opts.data.translations || this.translations; this.pattern = opts.data.pattern || this.pattern; @@ -6048,6 +6050,26 @@ Charcoal.Admin.Property_Input_SelectPicker.prototype.create_select = function () this.selectize = $select[0].selectize; }; + Selectize.prototype.init_allow_create = function () { + if(!this.allow_create) { + return; + } + + var selectize = this.selectize; + var $createButton = $(this.selectize_selector + '_create'); + var self = this; + + $createButton.on('click', function () { + self.create_item(null, function (item) { + // Create the item. + if (item && item.value) { + selectize.addOption(item); + selectize.addItem(item.value); + } + }); + }); + }; + Selectize.prototype.init_allow_update = function () { switch (this.selectize.settings.mode) { case 'single' : diff --git a/assets/dist/styles/charcoal.admin.css b/assets/dist/styles/charcoal.admin.css index 42cc35c75b..ad29bf006b 100644 --- a/assets/dist/styles/charcoal.admin.css +++ b/assets/dist/styles/charcoal.admin.css @@ -1412,16 +1412,28 @@ ul.c-panel_table { height: auto; } .c-attachments .panel-actions .glyphicon, -.c-attachments .dropdown-menu .glyphicon { +.c-attachments .dropdown-menu .glyphicon, +.c-attachments .panel-title .glyphicon, +.c-attachments .panel-body .glyphicon { vertical-align: text-top; } .c-attachments .panel-actions .fa, -.c-attachments .dropdown-menu .fa { +.c-attachments .dropdown-menu .fa, +.c-attachments .panel-title .fa, +.c-attachments .panel-body .fa { width: 1.25rem; text-align: left; } -.c-attachments .panel-title .fa { - width: 3.125rem; +.c-attachments .panel-actions .fa.-wide, +.c-attachments .dropdown-menu .fa.-wide, +.c-attachments .panel-title .fa.-wide, +.c-attachments .panel-body .fa.-wide { + width: 3.125rem; } + +.c-attachments .panel-actions .fa.-center, +.c-attachments .dropdown-menu .fa.-center, +.c-attachments .panel-title .fa.-center, +.c-attachments .panel-body .fa.-center { text-align: center; } .c-attachments .panel-actions-float {