by default)
+ if (privateMethods.keyInArray(e, opts.delimiterKeys)) {
+ privateMethods.applyDelimiter.call($self, e);
+ }
+ });
+
+ // BACKSPACE (keydown used for browser compatibility)
+ if (opts.deleteTagsOnBackspace) {
+ $self.on('keydown', function (e) {
+ if (privateMethods.keyInArray(e, opts.backspace)) {
+ // console.log("backspace detected");
+ if ($(this).val().length <= 0) {
+ publicMethods.popTag.call($self);
+ privateMethods.killEvent(e);
+ }
+ }
+ });
+ }
+
+ // on tag pop fill back the tag's content to the input field
+ if (opts.fillInputOnTagRemove) {
+ $self.on('tm:popped', function (e, tag) {
+ $(this).val(tag);
+ });
+ }
+
+ $self.change(function (e) {
+ if (!/webkit/.test(navigator.userAgent.toLowerCase())) {
+ $self.focus();
+ } // why?
+
+ /* unimplemented mode to push tag on blur
+ else if (tagManagerOptions.pushTagOnBlur) {
+ console.log('change: pushTagOnBlur ' + tag);
+ pushTag($(this).val());
+ } */
+ privateMethods.killEvent(e);
+ });
+
+ if (opts.prefilled !== null) {
+ if (typeof (opts.prefilled) === "object") {
+ privateMethods.prefill.call($self, opts.prefilled);
+ } else if (typeof (opts.prefilled) === "string") {
+ privateMethods.prefill.call($self, opts.prefilled.split(opts.baseDelimiter));
+ } else if (typeof (opts.prefilled) === "function") {
+ privateMethods.prefill.call($self, opts.prefilled());
+ }
+ } else if (opts.output !== null) {
+ if ($(opts.output) && $(opts.output).val()) { var existing_tags = $(opts.output); }
+ privateMethods.prefill.call($self, $(opts.output).val().split(opts.baseDelimiter));
+ }
+
+ });
+
+ return this;
+ }
+ };
+
+ $.fn.tagsManager = function (method) {
+ var $self = $(this);
+
+ if (!(0 in this)) { return this; }
+
+ if (publicMethods[method]) {
+ return publicMethods[method].apply($self, Array.prototype.slice.call(arguments, 1));
+ } else if (typeof method === 'object' || !method) {
+ return privateMethods.init.apply(this, arguments);
+ } else {
+ $.error('Method ' + method + ' does not exist.');
+ return false;
+ }
+ };
+
+}(jQuery));
diff --git a/resources/views/components/tags.blade.php b/resources/views/components/tags.blade.php
new file mode 100644
index 00000000..46e1fb78
--- /dev/null
+++ b/resources/views/components/tags.blade.php
@@ -0,0 +1,57 @@
+
+ id) style="display: none;" @endcannot/>
+
+
+
+@push('script')
+@cannot('project-edit', $pageItem->id)
+
+@endcannot
+
+@can('project-edit', $pageItem->id)
+
+@endcan
+
+@endpush
\ No newline at end of file
diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php
index 6de5260c..5ffda6f4 100644
--- a/resources/views/layouts/default.blade.php
+++ b/resources/views/layouts/default.blade.php
@@ -15,6 +15,8 @@
@yield('title') - {{ config('app.name', 'Wizard API') }}
+
+
{{----}}
@@ -80,7 +82,7 @@
-
+