plugins/kolab_notes plugins/tasklist
Aleksander Machniak
machniak at kolabsys.com
Thu Jan 8 19:38:40 CET 2015
plugins/kolab_notes/composer.json | 3
plugins/kolab_notes/jquery.tagedit.js | 1
plugins/kolab_notes/kolab_notes_ui.php | 5
plugins/kolab_notes/skins/larry/tagedit.css | 1
plugins/tasklist/composer.json | 3
plugins/tasklist/jquery.tagedit.js | 683 -------------
plugins/tasklist/skins/larry/tasklist.css | 1401 ----------------------------
plugins/tasklist/tasklist.php | 2
plugins/tasklist/tasklist_base.js | 1
plugins/tasklist/tasklist_ui.php | 7
10 files changed, 11 insertions(+), 2096 deletions(-)
New commits:
commit eab95ffdc2f7ad8636fc182e7e3a45a1b9a30879
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Thu Jan 8 10:19:53 2015 -0500
Use tagedit from jqueryui plugin (#3912)
diff --git a/plugins/kolab_notes/composer.json b/plugins/kolab_notes/composer.json
index 2ebb4ef..fd8005c 100644
--- a/plugins/kolab_notes/composer.json
+++ b/plugins/kolab_notes/composer.json
@@ -21,6 +21,7 @@
"require": {
"php": ">=5.3.0",
"roundcube/plugin-installer": ">=0.1.3",
- "kolab/libkolab": ">=1.1.0"
+ "kolab/libkolab": ">=1.1.0",
+ "roundcube/jqueryui": ">=1.10.4"
}
}
diff --git a/plugins/kolab_notes/jquery.tagedit.js b/plugins/kolab_notes/jquery.tagedit.js
deleted file mode 120000
index 6bb782c..0000000
--- a/plugins/kolab_notes/jquery.tagedit.js
+++ /dev/null
@@ -1 +0,0 @@
-../tasklist/jquery.tagedit.js
\ No newline at end of file
diff --git a/plugins/kolab_notes/kolab_notes_ui.php b/plugins/kolab_notes/kolab_notes_ui.php
index c03ea2d..6cec3b9 100644
--- a/plugins/kolab_notes/kolab_notes_ui.php
+++ b/plugins/kolab_notes/kolab_notes_ui.php
@@ -55,15 +55,14 @@ class kolab_notes_ui
$this->rc->output->include_script('list.js');
$this->rc->output->include_script('treelist.js');
$this->plugin->include_script('notes.js');
- $this->plugin->include_script('jquery.tagedit.js');
+
+ jqueryui::tagedit();
// include kolab folderlist widget if available
if (in_array('libkolab', $this->plugin->api->loaded_plugins())) {
$this->plugin->api->include_script('libkolab/js/folderlist.js');
}
- $this->plugin->include_stylesheet($this->plugin->local_skin_path() . '/tagedit.css');
-
// load config options and user prefs relevant for the UI
$settings = array(
'sort_col' => $this->rc->config->get('kolab_notes_sort_col', 'changed'),
diff --git a/plugins/kolab_notes/skins/larry/tagedit.css b/plugins/kolab_notes/skins/larry/tagedit.css
deleted file mode 120000
index f25378f..0000000
--- a/plugins/kolab_notes/skins/larry/tagedit.css
+++ /dev/null
@@ -1 +0,0 @@
-../../../tasklist/skins/larry/tagedit.css
\ No newline at end of file
diff --git a/plugins/tasklist/composer.json b/plugins/tasklist/composer.json
index 210490b..4673e64 100644
--- a/plugins/tasklist/composer.json
+++ b/plugins/tasklist/composer.json
@@ -21,6 +21,7 @@
"require": {
"php": ">=5.3.0",
"roundcube/plugin-installer": ">=0.1.3",
- "kolab/libcalendaring": ">=1.1.0"
+ "kolab/libcalendaring": ">=1.1.0",
+ "roundcube/jqueryui": ">=1.10.4"
}
}
diff --git a/plugins/tasklist/jquery.tagedit.js b/plugins/tasklist/jquery.tagedit.js
deleted file mode 100644
index baab701..0000000
--- a/plugins/tasklist/jquery.tagedit.js
+++ /dev/null
@@ -1,683 +0,0 @@
-/*
-* Tagedit - jQuery Plugin
-* The Plugin can be used to edit tags from a database the easy way
-*
-* Examples and documentation at: tagedit.webwork-albrecht.de
-*
-* License:
-* This work is licensed under a MIT License
-*
-* @licstart The following is the entire license notice for the
-* JavaScript code in this file.
-*
-* Copyright (c) 2010 Oliver Albrecht <info at webwork-albrecht.de>
-* Copyright (c) 2014 Thomas Brüderli <thomas at roundcube.net>
-*
-* Licensed under the MIT licenses
-*
-* 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.
-*
-* @licend The above is the entire license notice
-* for the JavaScript code in this file.
-*
-* @author Oliver Albrecht Mial: info at webwork-albrecht.de Twitter: @webworka
-* @version 1.5.2 (06/2014)
-* Requires: jQuery v1.4+, jQueryUI v1.8+, jQuerry.autoGrowInput
-*
-* Example of usage:
-*
-* $( "input.tag" ).tagedit();
-*
-* Possible options:
-*
-* autocompleteURL: '', // url for a autocompletion
-* deleteEmptyItems: true, // Deletes items with empty value
-* deletedPostfix: '-d', // will be put to the Items that are marked as delete
-* addedPostfix: '-a', // will be put to the Items that are choosem from the database
-* additionalListClass: '', // put a classname here if the wrapper ul shoud receive a special class
-* allowEdit: true, // Switch on/off edit entries
-* allowDelete: true, // Switch on/off deletion of entries. Will be ignored if allowEdit = false
-* allowAdd: true, // switch on/off the creation of new entries
-* direction: 'ltr' // Sets the writing direction for Outputs and Inputs
-* animSpeed: 500 // Sets the animation speed for effects
-* autocompleteOptions: {}, // Setting Options for the jquery UI Autocomplete (http://jqueryui.com/demos/autocomplete/)
-* breakKeyCodes: [ 13, 44 ], // Sets the characters to break on to parse the tags (defaults: return, comma)
-* checkNewEntriesCaseSensitive: false, // If there is a new Entry, it is checked against the autocompletion list. This Flag controlls if the check is (in-)casesensitive
-* texts: { // some texts
-* removeLinkTitle: 'Remove from list.',
-* saveEditLinkTitle: 'Save changes.',
-* deleteLinkTitle: 'Delete this tag from database.',
-* deleteConfirmation: 'Are you sure to delete this entry?',
-* deletedElementTitle: 'This Element will be deleted.',
-* breakEditLinkTitle: 'Cancel'
-* }
-*/
-
-(function($) {
-
- $.fn.tagedit = function(options) {
- /**
- * Merge Options with defaults
- */
- options = $.extend(true, {
- // default options here
- autocompleteURL: null,
- checkToDeleteURL: null,
- deletedPostfix: '-d',
- addedPostfix: '-a',
- additionalListClass: '',
- allowEdit: true,
- allowDelete: true,
- allowAdd: true,
- direction: 'ltr',
- animSpeed: 500,
- autocompleteOptions: {
- select: function( event, ui ) {
- $(this).val(ui.item.value).trigger('transformToTag', [ui.item.id]);
- return false;
- }
- },
- breakKeyCodes: [ 13, 44 ],
- checkNewEntriesCaseSensitive: false,
- texts: {
- removeLinkTitle: 'Remove from list.',
- saveEditLinkTitle: 'Save changes.',
- deleteLinkTitle: 'Delete this tag from database.',
- deleteConfirmation: 'Are you sure to delete this entry?',
- deletedElementTitle: 'This Element will be deleted.',
- breakEditLinkTitle: 'Cancel',
- forceDeleteConfirmation: 'There are more records using this tag, are you sure do you want to remove it?'
- },
- tabindex: false
- }, options || {});
-
- // no action if there are no elements
- if(this.length == 0) {
- return;
- }
-
- // set the autocompleteOptions source
- if(options.autocompleteURL) {
- options.autocompleteOptions.source = options.autocompleteURL;
- }
-
- // Set the direction of the inputs
- var direction= this.attr('dir');
- if(direction && direction.length > 0) {
- options.direction = this.attr('dir');
- }
-
- var elements = this;
- var focusItem = null;
-
- var baseNameRegexp = new RegExp("^(.*)\\[([0-9]*?("+options.deletedPostfix+"|"+options.addedPostfix+")?)?\]$", "i");
-
- var baseName = elements.eq(0).attr('name').match(baseNameRegexp);
- if(baseName && baseName.length == 4) {
- baseName = baseName[1];
- }
- else {
- // Elementname does not match the expected format, exit
- alert('elementname dows not match the expected format (regexp: '+baseNameRegexp+')')
- return;
- }
-
- // read tabindex from source element
- var ti;
- if (!options.tabindex && (ti = elements.eq(0).attr('tabindex')))
- options.tabindex = ti;
-
- // init elements
- inputsToList();
-
- /**
- * Creates the tageditinput from a list of textinputs
- *
- */
- function inputsToList() {
- var html = '<ul class="tagedit-list '+options.additionalListClass+'">';
-
- elements.each(function(i) {
- var element_name = $(this).attr('name').match(baseNameRegexp);
- if(element_name && element_name.length == 4 && (options.deleteEmptyItems == false || $(this).val().length > 0)) {
- if(element_name[1].length > 0) {
- var elementId = typeof element_name[2] != 'undefined'? element_name[2]: '',
- domId = 'tagedit-' + baseName + '-' + (elementId || i);
-
- html += '<li class="tagedit-listelement tagedit-listelement-old" aria-labelledby="'+domId+'">';
- html += '<span dir="'+options.direction+'" id="'+domId+'">' + $(this).val() + '</span>';
- html += '<input type="hidden" name="'+baseName+'['+elementId+']" value="'+$(this).val()+'" />';
- if (options.allowDelete)
- html += '<a class="tagedit-close" title="'+options.texts.removeLinkTitle+'" aria-label="'+options.texts.removeLinkTitle+' '+$(this).val()+'">x</a>';
- html += '</li>';
- }
- }
- });
-
- // replace Elements with the list and save the list in the local variable elements
- elements.last().after(html)
- var newList = elements.last().next();
- elements.remove();
- elements = newList;
-
- // Check if some of the elementshav to be marked as deleted
- if(options.deletedPostfix.length > 0) {
- elements.find('input[name$="'+options.deletedPostfix+'\]"]').each(function() {
- markAsDeleted($(this).parent());
- });
- }
-
- // put an input field at the End
- // Put an empty element at the end
- html = '<li class="tagedit-listelement tagedit-listelement-new">';
- if (options.allowAdd)
- html += '<input type="text" name="'+baseName+'[]" value="" id="tagedit-input" disabled="disabled" class="tagedit-input-disabled" dir="'+options.direction+'"/>';
- html += '</li>';
- html += '</ul>';
-
- elements
- .append(html)
- .attr('tabindex', options.tabindex) // set tabindex to <ul> to recieve focus
-
- // Set function on the input
- .find('#tagedit-input')
- .attr('tabindex', options.tabindex)
- .each(function() {
- $(this).autoGrowInput({comfortZone: 15, minWidth: 15, maxWidth: 20000});
-
- // Event is triggert in case of choosing an item from the autocomplete, or finish the input
- $(this).bind('transformToTag', function(event, id) {
- var oldValue = (typeof id != 'undefined' && (id.length > 0 || id > 0));
-
- var checkAutocomplete = oldValue == true || options.autocompleteOptions.noCheck ? false : true;
- // check if the Value ist new
- var isNewResult = isNew($(this).val(), checkAutocomplete);
- if(isNewResult[0] === true || (isNewResult[0] === false && typeof isNewResult[1] == 'string')) {
-
- if(oldValue == false && typeof isNewResult[1] == 'string') {
- oldValue = true;
- id = isNewResult[1];
- }
-
- if(options.allowAdd == true || oldValue) {
- var domId = 'tagedit-' + baseName + '-' + id;
- // Make a new tag in front the input
- html = '<li class="tagedit-listelement tagedit-listelement-old" aria-labelledby="'+domId+'">';
- html += '<span dir="'+options.direction+'" id="'+domId+'">' + $(this).val() + '</span>';
- var name = oldValue? baseName + '['+id+options.addedPostfix+']' : baseName + '[]';
- html += '<input type="hidden" name="'+name+'" value="'+$(this).val()+'" />';
- html += '<a class="tagedit-close" title="'+options.texts.removeLinkTitle+'" aria-label="'+options.texts.removeLinkTitle+' '+$(this).val()+'">x</a>';
- html += '</li>';
-
- $(this).parent().before(html);
- }
- }
- $(this).val('');
-
- // close autocomplete
- if(options.autocompleteOptions.source) {
- if($(this).is(':ui-autocomplete'))
- $(this).autocomplete( "close" );
- }
-
- })
- .keydown(function(event) {
- var code = event.keyCode > 0? event.keyCode : event.which;
-
- switch(code) {
- case 46:
- if (!focusItem)
- break;
- case 8: // BACKSPACE
- if(focusItem) {
- focusItem.fadeOut(options.animSpeed, function() {
- $(this).remove();
- })
- unfocusItem();
- event.preventDefault();
- return false;
- }
- else if($(this).val().length == 0) {
- // delete Last Tag
- var elementToRemove = elements.find('li.tagedit-listelement-old').last();
- elementToRemove.fadeOut(options.animSpeed, function() {elementToRemove.remove();})
- event.preventDefault();
- return false;
- }
- break;
- case 9: // TAB
- if($(this).val().length > 0 && $('ul.ui-autocomplete #ui-active-menuitem').length == 0) {
- $(this).trigger('transformToTag');
- event.preventDefault();
- return false;
- }
- break;
- case 37: // LEFT
- case 39: // RIGHT
- if($(this).val().length == 0) {
- // select previous Tag
- var inc = code == 37 ? -1 : 1,
- items = elements.find('li.tagedit-listelement-old')
- x = items.length, next = 0;
- items.each(function(i, elem) {
- if ($(elem).hasClass('tagedit-listelement-focus')) {
- x = i;
- return true;
- }
- });
- unfocusItem();
- next = Math.max(0, x + inc);
- if (items.get(next)) {
- focusItem = items.eq(next).addClass('tagedit-listelement-focus');
- $(this).attr('aria-activedescendant', focusItem.attr('aria-labelledby'))
-
- if(options.autocompleteOptions.source != false) {
- $(this).autocomplete('close').autocomplete('disable');
- }
- }
- event.preventDefault();
- return false;
- }
- break;
- default:
- // ignore input if an item is focused
- if (focusItem !== null) {
- event.preventDefault();
- event.bubble = false;
- return false;
- }
- }
- return true;
- })
- .keypress(function(event) {
- var code = event.keyCode > 0? event.keyCode : event.which;
- if($.inArray(code, options.breakKeyCodes) > -1) {
- if($(this).val().length > 0 && $('ul.ui-autocomplete #ui-active-menuitem').length == 0) {
- $(this).trigger('transformToTag');
- }
- event.preventDefault();
- return false;
- }
- else if($(this).val().length > 0){
- unfocusItem();
- }
- return true;
- })
- .bind('paste', function(e){
- var that = $(this);
- if (e.type == 'paste'){
- setTimeout(function(){
- that.trigger('transformToTag');
- }, 1);
- }
- })
- .blur(function() {
- if($(this).val().length == 0) {
- // disable the field to prevent sending with the form
- $(this).attr('disabled', 'disabled').addClass('tagedit-input-disabled');
- }
- else {
- // Delete entry after a timeout
- var input = $(this);
- $(this).data('blurtimer', window.setTimeout(function() {input.val('');}, 500));
- }
- unfocusItem();
- // restore tabindex when widget looses focus
- if (options.tabindex)
- elements.attr('tabindex', options.tabindex);
- })
- .focus(function() {
- window.clearTimeout($(this).data('blurtimer'));
- // remove tabindex on <ul> because #tagedit-input now has it
- elements.attr('tabindex', '-1');
- });
-
- if(options.autocompleteOptions.source != false) {
- $(this).autocomplete(options.autocompleteOptions);
- }
- })
- .end()
- .click(function(event) {
- switch(event.target.tagName) {
- case 'A':
- $(event.target).parent().fadeOut(options.animSpeed, function() {
- $(event.target).parent().remove();
- elements.find('#tagedit-input').focus();
- });
- break;
- case 'INPUT':
- case 'SPAN':
- case 'LI':
- if($(event.target).hasClass('tagedit-listelement-deleted') == false &&
- $(event.target).parent('li').hasClass('tagedit-listelement-deleted') == false) {
- // Don't edit an deleted Items
- return doEdit(event);
- }
- default:
- $(this).find('#tagedit-input')
- .removeAttr('disabled')
- .removeClass('tagedit-input-disabled')
- .focus();
- }
- return false;
- })
- // forward focus event (on tabbing through the form)
- .focus(function(e){ $(this).click(); })
- }
-
- /**
- * Remove class and reference to currently focused tag item
- */
- function unfocusItem() {
- if(focusItem){
- if(options.autocompleteOptions.source != false) {
- elements.find('#tagedit-input').autocomplete('enable');
- }
- focusItem.removeClass('tagedit-listelement-focus');
- focusItem = null;
- elements.find('#tagedit-input').removeAttr('aria-activedescendant');
- }
- }
-
- /**
- * Sets all Actions and events for editing an Existing Tag.
- *
- * @param event {object} The original Event that was given
- * return {boolean}
- */
- function doEdit(event) {
- if(options.allowEdit == false) {
- // Do nothing
- return;
- }
-
- var element = event.target.tagName == 'SPAN'? $(event.target).parent() : $(event.target);
-
- var closeTimer = null;
-
- // Event that is fired if the User finishes the edit of a tag
- element.bind('finishEdit', function(event, doReset) {
- window.clearTimeout(closeTimer);
-
- var textfield = $(this).find(':text');
- var isNewResult = isNew(textfield.val(), true);
- if(textfield.val().length > 0 && (typeof doReset == 'undefined' || doReset === false) && (isNewResult[0] == true)) {
- // This is a new Value and we do not want to do a reset. Set the new value
- $(this).find(':hidden').val(textfield.val());
- $(this).find('span').html(textfield.val());
- }
-
- textfield.remove();
- $(this).find('a.tagedit-save, a.tagedit-break, a.tagedit-delete').remove(); // Workaround. This normaly has to be done by autogrow Plugin
- $(this).removeClass('tagedit-listelement-edit').unbind('finishEdit');
- return false;
- });
-
- var hidden = element.find(':hidden');
- html = '<input type="text" name="tmpinput" autocomplete="off" value="'+hidden.val()+'" class="tagedit-edit-input" dir="'+options.direction+'"/>';
- html += '<a class="tagedit-save" title="'+options.texts.saveEditLinkTitle+'">o</a>';
- html += '<a class="tagedit-break" title="'+options.texts.breakEditLinkTitle+'">x</a>';
-
- // If the Element is one from the Database, it can be deleted
- if(options.allowDelete == true && element.find(':hidden').length > 0 &&
- typeof element.find(':hidden').attr('name').match(baseNameRegexp)[3] != 'undefined') {
- html += '<a class="tagedit-delete" title="'+options.texts.deleteLinkTitle+'">d</a>';
- }
-
- hidden.after(html);
- element
- .addClass('tagedit-listelement-edit')
- .find('a.tagedit-save')
- .click(function() {
- $(this).parent().trigger('finishEdit');
- return false;
- })
- .end()
- .find('a.tagedit-break')
- .click(function() {
- $(this).parent().trigger('finishEdit', [true]);
- return false;
- })
- .end()
- .find('a.tagedit-delete')
- .click(function() {
- window.clearTimeout(closeTimer);
- if(confirm(options.texts.deleteConfirmation)) {
- var canDelete = checkToDelete($(this).parent());
- if (!canDelete && confirm(options.texts.forceDeleteConfirmation)) {
- markAsDeleted($(this).parent());
- }
-
- if(canDelete) {
- markAsDeleted($(this).parent());
- }
-
- $(this).parent().find(':text').trigger('finishEdit', [true]);
- }
- else {
- $(this).parent().find(':text').trigger('finishEdit', [true]);
- }
- return false;
- })
- .end()
- .find(':text')
- .focus()
- .autoGrowInput({comfortZone: 10, minWidth: 15, maxWidth: 20000})
- .keypress(function(event) {
- switch(event.keyCode) {
- case 13: // RETURN
- event.preventDefault();
- $(this).parent().trigger('finishEdit');
- return false;
- case 27: // ESC
- event.preventDefault();
- $(this).parent().trigger('finishEdit', [true]);
- return false;
- }
- return true;
- })
- .blur(function() {
- var that = $(this);
- closeTimer = window.setTimeout(function() {that.parent().trigger('finishEdit', [true])}, 500);
- });
- }
-
- /**
- * Verifies if the tag select to be deleted is used by other records using an Ajax request.
- *
- * @param element
- * @returns {boolean}
- */
- function checkToDelete(element) {
- // if no URL is provide will not verify
- if(options.checkToDeleteURL === null) {
- return false;
- }
-
- var inputName = element.find('input:hidden').attr('name');
- var idPattern = new RegExp('\\d');
- var tagId = inputName.match(idPattern);
- var checkResult = false;
-
- $.ajax({
- async : false,
- url : options.checkToDeleteURL,
- dataType: 'json',
- type : 'POST',
- data : { 'tagId' : tagId},
- complete: function (XMLHttpRequest, textStatus) {
-
- // Expected JSON Object: { "success": Boolean, "allowDelete": Boolean}
- var result = $.parseJSON(XMLHttpRequest.responseText);
- if(result.success === true){
- checkResult = result.allowDelete;
- }
- }
- });
-
- return checkResult;
- }
-
- /**
- * Marks a single Tag as deleted.
- *
- * @param element {object}
- */
- function markAsDeleted(element) {
- element
- .trigger('finishEdit', [true])
- .addClass('tagedit-listelement-deleted')
- .attr('title', options.deletedElementTitle);
- element.find(':hidden').each(function() {
- var nameEndRegexp = new RegExp('('+options.addedPostfix+'|'+options.deletedPostfix+')?\]');
- var name = $(this).attr('name').replace(nameEndRegexp, options.deletedPostfix+']');
- $(this).attr('name', name);
- });
-
- }
-
- /**
- * Checks if a tag is already choosen.
- *
- * @param value {string}
- * @param checkAutocomplete {boolean} optional Check also the autocomplet values
- * @returns {Array} First item is a boolean, telling if the item should be put to the list, second is optional the ID from autocomplete list
- */
- function isNew(value, checkAutocomplete) {
- checkAutocomplete = typeof checkAutocomplete == 'undefined'? false : checkAutocomplete;
- var autoCompleteId = null;
-
- var compareValue = options.checkNewEntriesCaseSensitive == true? value : value.toLowerCase();
-
- var isNew = true;
- elements.find('li.tagedit-listelement-old input:hidden').each(function() {
- var elementValue = options.checkNewEntriesCaseSensitive == true? $(this).val() : $(this).val().toLowerCase();
- if(elementValue == compareValue) {
- isNew = false;
- }
- });
-
- if (isNew == true && checkAutocomplete == true && options.autocompleteOptions.source != false) {
- var result = [];
- if ($.isArray(options.autocompleteOptions.source)) {
- result = options.autocompleteOptions.source;
- }
- else if ($.isFunction(options.autocompleteOptions.source)) {
- options.autocompleteOptions.source({term: value}, function (data) {result = data});
- }
- else if (typeof options.autocompleteOptions.source === "string") {
- // Check also autocomplete values
- var autocompleteURL = options.autocompleteOptions.source;
- if (autocompleteURL.match(/\?/)) {
- autocompleteURL += '&';
- } else {
- autocompleteURL += '?';
- }
- autocompleteURL += 'term=' + value;
- $.ajax({
- async: false,
- url: autocompleteURL,
- dataType: 'json',
- complete: function (XMLHttpRequest, textStatus) {
- result = $.parseJSON(XMLHttpRequest.responseText);
- }
- });
- }
-
- // If there is an entry for that already in the autocomplete, don't use it (Check could be case sensitive or not)
- for (var i = 0; i < result.length; i++) {
- var resultValue = result[i].label? result[i].label : result[i];
- var label = options.checkNewEntriesCaseSensitive == true? resultValue : resultValue.toLowerCase();
- if (label == compareValue) {
- isNew = false;
- autoCompleteId = typeof result[i] == 'string' ? i : result[i].id;
- break;
- }
- }
- }
-
- return new Array(isNew, autoCompleteId);
- }
- }
-})(jQuery);
-
-(function($){
-
-// jQuery autoGrowInput plugin by James Padolsey
-// See related thread: http://stackoverflow.com/questions/931207/is-there-a-jquery-autogrow-plugin-for-text-fields
-
-$.fn.autoGrowInput = function(o) {
-
- o = $.extend({
- maxWidth: 1000,
- minWidth: 0,
- comfortZone: 70
- }, o);
-
- this.filter('input:text').each(function(){
-
- var minWidth = o.minWidth || $(this).width(),
- val = '',
- input = $(this),
- testSubject = $('<tester/>').css({
- position: 'absolute',
- top: -9999,
- left: -9999,
- width: 'auto',
- fontSize: input.css('fontSize'),
- fontFamily: input.css('fontFamily'),
- fontWeight: input.css('fontWeight'),
- letterSpacing: input.css('letterSpacing'),
- whiteSpace: 'nowrap'
- }),
- check = function() {
-
- if (val === (val = input.val())) {return;}
-
- // Enter new content into testSubject
- var escaped = val.replace(/&/g, '&').replace(/\s/g,' ').replace(/</g, '<').replace(/>/g, '>');
- testSubject.html(escaped);
-
- // Calculate new width + whether to change
- var testerWidth = testSubject.width(),
- newWidth = (testerWidth + o.comfortZone) >= minWidth ? testerWidth + o.comfortZone : minWidth,
- currentWidth = input.width(),
- isValidWidthChange = (newWidth < currentWidth && newWidth >= minWidth)
- || (newWidth > minWidth && newWidth < o.maxWidth);
-
- // Animate width
- if (isValidWidthChange) {
- input.width(newWidth);
- }
-
- };
-
- testSubject.insertAfter(input);
-
- $(this).bind('keyup keydown blur update', check);
-
- check();
- });
-
- return this;
-
-};
-
-})(jQuery);
\ No newline at end of file
diff --git a/plugins/tasklist/skins/larry/tasklist.css b/plugins/tasklist/skins/larry/tasklist.css
deleted file mode 100644
index 2aaf44b..0000000
--- a/plugins/tasklist/skins/larry/tasklist.css
+++ /dev/null
@@ -1,1401 +0,0 @@
-/**
- * Roundcube Taklist plugin styles for skin "Larry"
- *
- * Copyright (C) 2012, Kolab Systems AG <contact at kolabsys.com>
- * Screendesign by FLINT / Büro für Gestaltung, bueroflint.com
- *
- * The contents are subject to the Creative Commons Attribution-ShareAlike
- * License. It is allowed to copy, distribute, transmit and to adapt the work
- * by keeping credits to the original autors in the README file.
- * See http://creativecommons.org/licenses/by-sa/3.0/ for details.
- */
-
-#taskbar a.button-tasklist span.button-inner {
- background-image: url(buttons.png);
- background-position: 0 0;
-}
-
-#taskbar a.button-tasklist:hover span.button-inner,
-#taskbar a.button-tasklist.button-selected span.button-inner {
- background-position: 0 -26px;
-}
-
-ul.toolbarmenu li span.icon.taskadd,
-#attachmentmenu li a.tasklistlink span.icon.taskadd {
- background-image: url(buttons.png);
- background-position: -4px -90px;
-}
-
-.tasklistview div.uidialog {
- display: none;
-}
-
-body.tasklist.attachmentwin #mainscreen {
- top: 32px;
-}
-
-.tasklistview #mainscreen {
- min-width: 1000px !important;
- min-height: 520px !important;
-}
-
-.tasklistview #header {
- min-width: 1020px !important;
-}
-
-#sidebar {
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- width: 240px;
-}
-
-.tasklistview #searchmenulink {
- width: 15px;
-}
-
-#tagsbox {
- position: absolute;
- top: 42px;
- left: 0;
- width: 100%;
- height: 242px;
-}
-
-#tasklistsbox {
- position: absolute;
- top: 300px;
- left: 0;
- width: 100%;
- bottom: 0px;
-}
-
-#tasklistsbox .boxtitle a.iconbutton.search {
- position: absolute;
- top: 8px;
- right: 8px;
- width: 16px;
- cursor: pointer;
- background-position: -2px -317px;
-}
-
-#tasklistsbox .listsearchbox {
- display: none;
-}
-
-#tasklistsbox .listsearchbox.expanded {
- display: block;
-}
-
-#tasklistsbox .scroller {
- top: 34px;
-}
-
-#tasklistsbox .listsearchbox.expanded + .scroller {
- top: 68px;
-}
-
-
-#taskselector {
- margin: -1px 40px 0 0;
- padding: 0;
-}
-
-#taskselector li {
- display: inline-block;
- position: relative;
- font-size: 90%;
- padding-right: 0.3em;
-}
-
-.tagcloud li,
-#taskselector li a {
- display: inline-block;
- color: #004458;
- min-width: 3.5em;
- padding: 0.2em 0.6em 0.2em 0.6em;
- text-align: center;
- text-decoration: none;
- border: 1px solid #eee;
- border-color: transparent;
-}
-
-.webkit .tagcloud li,
-.webkit #taskselector li a {
- padding-bottom: 0.25em;
-}
-
-
-#taskselector li:first-child {
- border-top: 0;
- border-radius: 4px 4px 0 0;
-}
-
-#taskselector li:last-child {
- border-bottom: 0;
- border-radius: 0 0 4px 4px;
-}
-
-#taskselector li.overdue a {
- color: #b72a2a;
- font-weight: bold;
-}
-
-#taskselector li.inactive a {
- color: #97b3bf;
-}
-
-.tagcloud li.selected,
-#taskselector li.selected a {
- color: #fff;
- background: #005d76;
- background: -moz-linear-gradient(top, #005d76 0%, #004558 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#005d76), color-stop(100%,#004558));
- background: -o-linear-gradient(top, #005d76 0%, #004558 100%);
- background: -ms-linear-gradient(top, #005d76 0%, #004558 100%);
- background: linear-gradient(top, #005d76 0%, #004558 100%);
- box-shadow: inset 0 1px 1px 0 #003645;
- -o-box-shadow: inset 0 1px 1px 0 #003645;
- -webkit-box-shadow: inset 0 1px 1px 0 #003645;
- -moz-box-shadow: inset 0 1px 1px 0 #003645;
- border-color: #003645;
- border-radius: 10px;
- text-shadow: none;
-}
-
-#taskselector li .count {
- display: none;
- position: absolute;
- top: -18px;
- right: 5px;
- min-width: 1.8em;
- padding: 2px 4px;
- background: #004558;
- background: -moz-linear-gradient(top, #005d76 0%, #004558 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#005d76), color-stop(100%,#004558));
- background: -o-linear-gradient(top, #005d76 0%, #004558 100%);
- background: -ms-linear-gradient(top, #005d76 0%, #004558 100%);
- background: linear-gradient(top, #005d76 0%, #004558 100%);
- box-shadow: 0 1px 2px 0 rgba(24,24,24,0.6);
- color: #fff;
- border-radius: 3px;
- text-align: center;
- font-weight: bold;
- font-size: 80%;
- text-shadow: none;
-}
-
-#taskselector li .count:after {
- content: "";
- position: absolute;
- bottom: -5px;
- left: 50%;
- margin-left: -5px;
- border-style: solid;
- border-width: 5px 5px 0;
- border-color: #004558 transparent;
- /* reduce the damage in FF3.0 */
- display: block;
- width: 0;
-}
-
-#taskselector li.overdue .count {
- background: #ff3800;
-}
-
-#taskselector li.overdue .count:after {
- border-color: #ff3800 transparent;
-}
-
-.tagcloud {
- padding: 0;
- margin: 6px;
- list-style: none;
-}
-
-.tagcloud li {
- display: inline-block;
- color: #004458;
- padding-right: 0.2em;
- margin-right: 0.3em;
- margin-bottom: 0.4em;
- min-width: 1.2em;
- cursor: pointer;
-}
-
-.tagcloud li.inactive {
- color: #89b3be;
- padding-right: 0.6em;
- font-size: 80%;
-/* display: none; */
-}
-
-.tagcloud li .count {
- position: relative;
- top: -1px;
- margin-left: 5px;
- padding: 0.15em 0.5em;
- font-size: 80%;
- font-weight: bold;
- color: #59838e;
- background: #c7e3ef;
- box-shadow: inset 0 1px 1px 0 #b0ccd7;
- -o-box-shadow: inset 0 1px 1px 0 #b0ccd7;
- -webkit-box-shadow: inset 0 1px 1px 0 #b0ccd7;
- -moz-box-shadow: inset 0 1px 1px 0 #b0ccd7;
- border-color: #b0ccd7;
- border-radius: 8px;
-}
-
-.tag-draghelper .tag .count,
-.tagcloud li.inactive .count {
- display: none;
-}
-
-#tasklistsbox .treelist li {
- margin: 0;
- display: block;
- position: relative;
-}
-
-#tasklistsbox .treelist li div.tasklist {
- margin: 0;
- height: 20px;
- padding: 6px 8px 2px 6px;
- position: relative;
- white-space: nowrap;
-}
-
-#tasklistsbox .treelist li.virtual > div.tasklist {
- height: 14px;
-}
-
-#tasklistsbox .treelist ul li > div.tasklist {
- margin-left: 16px;
-}
-
-#tasklistsbox .treelist ul ul li > div.tasklist {
- margin-left: 32px;
-}
-
-#tasklistsbox .treelist ul ul ul li > div.tasklist {
- margin-left: 48px;
-}
-
-#tasklistsbox .treelist li label {
- display: block;
-}
-
-#tasklistsbox .treelist li span.listname {
- display: block;
- position: absolute;
- top: 7px;
- left: 38px;
- right: 40px;
- cursor: default;
- padding: 0px 30px 2px 2px;
- color: #004458;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- background: url(sprites.png) right 20px no-repeat;
-}
-
-.quickview-active #tasklistsbox .treelist li input,
-.quickview-active #tasklistsbox .treelist li span.listname {
- opacity: 0.35;
-}
-
-.quickview-active #tasklistsbox .treelist div.focusview span.listname {
- opacity: 1.0;
-}
-
-#tasklistsbox .treelist div span.actions {
- display: inline-block;
- position: absolute;
- top: 2px;
- right: 2px;
- padding: 5px 20px 0 6px;
- min-width: 40px;
- height: 19px;
- text-align: right;
-}
-
-#tasklistsbox .treelist div:hover span.actions {
- top: 1px;
- right: 1px;
- border: 1px solid #c6c6c6;
- border-radius: 4px;
- background: #f7f7f7;
- background: -moz-linear-gradient(top, #f9f9f9 0%, #e6e6e6 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f9f9f9), color-stop(100%,#e6e6e6));
- background: -o-linear-gradient(top, #f9f9f9 0%, #e6e6e6 100%);
- background: -ms-linear-gradient(top, #f9f9f9 0%, #e6e6e6 100%);
- background: linear-gradient(top, #f9f9f9 0%, #e6e6e6 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e6e6e6', GradientType=0);
-}
-
-#tasklistsbox .treelist div a.remove,
-#tasklistsbox .treelist div a.quickview,
-#tasklistsbox .treelist div a.subscribed {
- display: inline-block;
- width: 16px;
- height: 16px;
- padding: 0;
- margin-right: 4px;
- background: url(sprites.png) -200px 0 no-repeat;
- overflow: hidden;
- text-indent: -5000px;
- cursor: pointer;
-}
-
-#tasklistsbox .treelist div a.subscribed {
- position: absolute;
- top: 5px;
- right: 4px;
- margin: 0;
-}
-
-#tasklistsbox .treelist div a.subscribed:focus,
-#tasklistsbox .treelist div:hover a.subscribed {
- background-position: -2px -215px;
-}
-
-#tasklistsbox .treelist div.subscribed a.subscribed {
- background-position: -20px -215px;
-}
-
-#tasklistsbox .treelist div a.quickview:focus,
-#tasklistsbox .treelist div:hover a.quickview {
- background-position: -20px -101px;
- background-color: transparent !important;
-}
-
-#tasklistsbox .treelist div a.remove:focus,
-#tasklistsbox .treelist div:hover a.remove {
- background-position: -2px -371px;
- background-color: transparent !important;
-}
-
-#tasklistsbox .treelist div.focusview a.quickview {
- background-position: -2px -101px;
-}
-
-#tasklistsbox .searchresults .treelist div a.remove,
-#tasklistsbox .searchresults .treelist div a.quickview {
- display: none;
-}
-
-#tasklistsbox .treelist div a.remove:focus,
-#tasklistsbox .treelist div a.quickview:focus,
-#tasklistsbox .treelist div a.subscribed:focus {
- border-radius: 3px;
- outline: 2px solid rgba(30,150,192, 0.5);
-}
-
-#tasklistsbox .treelist li.selected > div > span.listname {
- font-weight: bold;
-}
-
-#tasklistsbox .treelist .readonly > span.listname {
- background-position: right -142px;
-}
-
-#tasklistsbox .treelist .user > span.listname {
- background-position: right -160px;
-}
-
-#tasklistsbox .treelist .virtual > span.listname {
- color: #aaa;
- top: 4px;
- left: 20px;
- right: 5px;
-}
-
-#tasklistsbox .treelist.flat li span.calname {
- left: 24px;
- right: 22px;
-}
-
-#tasklistsbox .treelist li input {
- position: absolute;
- top: 5px;
- left: 18px;
-}
-
-#tasklistsbox .treelist li .treetoggle {
- top: 8px;
-}
-
-#tasklistsbox .treelist li.virtual > .treetoggle {
- top: 6px;
-}
-
-#tasklistsbox .searchresults {
- background: #b0ccd7;
- margin-top: 8px;
-}
-
-#tasklistsbox .searchresults .boxtitle {
- background: none;
- padding: 2px 8px 2px 8px;
-}
-
-#tasklistsbox .searchresults .listing li {
- background-color: #c7e3ef;
-}
-
-#mainview-right {
- position: absolute;
- top: 0;
- left: 256px;
- right: 0;
- bottom: 0;
-}
-
-#taskstoolbar {
- position: absolute;
- top: -6px;
- left: 0;
- width: 100%;
- height: 40px;
- white-space: nowrap;
-}
-
-#taskstoolbar a.button.newtask {
- background-image: url(buttons.png);
- background-position: center -53px;
-}
-
-#quickaddbox {
- position: absolute;
- top: 2px;
- left: 0;
- width: 60%;
- height: 32px;
- white-space: nowrap;
-}
-
-#quickaddinput {
- width: 85%;
- margin: 0;
- padding: 3px 8px;
- height: 18px;
- background: #f1f1f1;
- background: rgba(255, 255, 255, 0.7);
- border-color: #a3a3a3;
- font-weight: bold;
-}
-
-#quickaddbox .button {
- margin-left: 5px;
- padding: 3px 10px;
- font-weight: bold;
-}
-
-#tasksview {
- position: absolute;
- top: 42px;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(255, 255, 255, 0.2);
- overflow: visible;
-}
-
-.quickview-active #tasksview {
- background-image: url('images/focusview.png');
- background-position: center;
- background-repeat: no-repeat;
-}
-
-#message.statusbar {
- border-top: 1px solid #c3c3c3;
-}
-
-#tasksview .scroller {
- position: absolute;
- left: 0;
- top: 35px;
- width: 100%;
- bottom: 0;
- overflow: auto;
-}
-
-#tasksview .buttonbar {
- color: #777;
- background: #eee;
- background: -moz-linear-gradient(top, #eee 0%, #dfdfdf 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eee), color-stop(100%,#dfdfdf));
- background: -o-linear-gradient(top, #eee 0%, #dfdfdf 100%);
- background: -ms-linear-gradient(top, #eee 0%, #dfdfdf 100%);
- background: linear-gradient(top, #eee 0%, #dfdfdf 100%);
- border-bottom: 1px solid #ccc;
- position: relative;
- line-height: 13px;
- height: 20px;
-}
-
-#tasksview .buttonbar .buttonbar-right {
- position: absolute;
- top: 6px;
- right: 8px;
-}
-
-.buttonbar-right .listmenu {
- display: inline-block;
- cursor: pointer;
-}
-
-.buttonbar-right a.iconbutton {
- padding: 0;
- background-image: url(sprites.png);
- background-position: 0 -238px;
-}
-
-.buttonbar-right a.iconbutton.sorting {
- background-position: -18px -347px;
-}
-
-#thelist {
- padding: 0;
- margin: 1em;
- list-style: none;
-}
-
-#listmessagebox {
- display: none;
- font-size: 14px;
- color: #666;
- margin: 1.5em;
- text-shadow: 0px 1px 1px #fff;
- text-align:center;
-}
-
-.taskitem {
- position: relative;
- display: block;
- margin-bottom: 3px;
-}
-
-.taskitem.dragging {
- opacity: 0.5;
-}
-
-.taskitem .childtasks {
- position: relative;
- padding: 0;
- margin: 3px 0 0 20px;
- list-style: none;
-}
-
-.taskitem .childtoggle {
- display: none;
- position: absolute;
- top: 4px;
- left: -5px;
- padding: 2px;
- font-size: 10px;
- color: #727272;
- cursor: pointer;
-
- width: 14px;
- height: 14px;
- background: url(sprites.png) -2px -80px no-repeat;
- text-indent: -1000px;
- overflow: hidden;
-}
-
-.taskitem .childtoggle.collapsed {
- background-position: -18px -81px;
-}
-
-.taskhead {
- position: relative;
- margin-left: 14px;
- padding: 4px 5px 3px 5px;
- border: 1px solid #fff;
- border-radius: 5px;
- background: #fff;
- -webkit-box-shadow: 0 1px 1px 0 rgba(50, 50, 50, 0.5);
- -moz-box-shadow: 0 1px 1px 0 rgba(50, 50, 50, 0.5);
- box-shadow: 0 1px 1px 0 rgba(50, 50, 50, 0.5);
- padding-right: 26em;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- cursor: default;
- outline: none;
-}
-
-.taskhead:focus,
-.taskhead.droptarget {
- border-color: #4787b1;
- box-shadow: 0 0 5px 2px rgba(71,135,177, 0.9);
- -moz-box-shadow: 0 0 5px 2px rgba(71,135,177, 0.9);
- -webkit-box-shadow: 0 0 5px 2px rgba(71,135,177, 0.9);
- -o-box-shadow: 0 0 5px 2px rgba(71,135,177, 0.9);
-}
-
-.taskhead .complete {
- margin: -1px 1em 0 0;
-}
-
-.taskhead .title {
- font-size: 12px;
-}
-
-.taskhead .flagged {
- display: inline-block;
- width: 16px;
- height: 16px;
- background: url(sprites.png) 1000px -3px no-repeat;
- margin: -3px 1em 0 0;
- vertical-align: middle;
- cursor: pointer;
-}
-
-.taskhead .flagged:focus,
-.taskhead:hover .flagged {
- background-position: -2px -3px;
-}
-
-.taskhead.flagged .flagged {
- background-position: -2px -23px;
-}
-
-.taskhead .tags {
- display: block;
- position: absolute;
- top: 3px;
- right: 10em;
- max-width: 14em;
- height: 16px;
- overflow: hidden;
- padding-top: 1px;
- text-align: right;
-}
-
-.tag-draghelper .tag,
-.taskhead .tags .tag {
- font-size: 85%;
- background: #d9ecf4;
- border: 1px solid #c2dae5;
- border-radius: 4px;
- padding: 1px 7px;
- margin-right: 3px;
-}
-
-.tag-draghelper li.tag {
- list-style: none;
- font-size: 100%;
-}
-
-.taskhead .date {
- position: absolute;
- top: 4px;
- right: 30px;
- text-align: right;
- cursor: pointer;
-}
-
-.taskhead.nodate .date {
- color: #ddd;
-}
-
-.taskhead.overdue .date {
- color: #d00;
-}
-
-.taskhead.nodate:hover .date {
- color: #999;
-}
-
-.taskhead .date input {
- padding: 1px 2px;
- border: 1px solid #ddd;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
- outline: none;
- text-align: right;
- width: 6em;
- font-size: 11px;
-}
-
-.taskhead .actions {
- display: block;
- position: absolute;
- top: 3px;
- right: 6px;
- width: 18px;
- height: 18px;
- background: url(sprites.png) 1000px -80px no-repeat;
- text-indent: -5000px;
- overflow: hidden;
- cursor: pointer;
-}
-
-.taskhead .actions:focus,
-.taskhead:hover .actions {
- background-position: 0 -80px;
-}
-
-.taskhead.complete {
- opacity: 0.6;
-}
-
-.taskhead.complete .title {
- text-decoration: line-through;
-}
-
-.taskhead .progressbar {
- position: absolute;
- bottom: 1px;
- left: 6px;
- right: 6px;
- height: 2px;
-}
-
-.taskhead.complete .progressbar {
- display: none;
-}
-
-.taskhead .progressvalue {
- height: 1px;
- background: rgba(1, 124, 180, 0.2);
- border-top: 1px solid #219de6;
-}
-
-ul.toolbarmenu li span.add,
-ul.toolbarmenu li span.expand,
-ul.toolbarmenu li span.collapse,
-ul.toolbarmenu.iconized .selected span.icon {
- background-image: url(sprites.png);
-}
-
-ul.toolbarmenu li span.add {
- background-position: 0 -302px;
-}
-
-ul.toolbarmenu li span.expand {
- background-position: 0 -258px;
-}
-
-ul.toolbarmenu li span.collapse {
- background-position: 0 -280px;
-}
-
-ul.toolbarmenu li span.delete {
- background-position: 0 -1508px;
-}
-
-ul.toolbarmenu.iconized .selected span.icon {
- background-position: 0 -324px;
-}
-
-ul.toolbarmenu .sortcol.by-auto a {
- font-style: italic;
-}
-
-.taskitem-draghelper {
-/*
- width: 32px;
- height: 26px;
-*/
- background: #444;
- border: 1px solid #555;
- border-radius: 4px;
- box-shadow: 0 2px 6px 0 #333;
- -moz-box-shadow: 0 2px 6px 0 #333;
- -webkit-box-shadow: 0 2px 6px 0 #333;
- -o-box-shadow: 0 2px 6px 0 #333;
- z-index: 5000;
- padding: 2px 10px;
- font-size: 20px;
- color: #ccc;
- opacity: 0.92;
- filter: alpha(opacity=90);
- text-shadow: 0px 1px 1px #333;
-}
-
-#rootdroppable {
- display: none;
- position: absolute;
- top: 2px;
- left: 1em;
- right: 1em;
- height: 5px;
- background: #ddd;
- border-radius: 3px;
-}
-
-#rootdroppable.droptarget {
- background: #4787b1;
- box-shadow: 0 0 2px 1px rgba(71,135,177, 0.9);
- -moz-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.9);
- -webkit-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.9);
- -o-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.9);
-
-}
-
-/*** task edit form ***/
-
-#taskedit,
-#taskshow {
- display:none;
-}
-
-#taskedit {
- position: relative;
- top: -1.5em;
- padding: 0.5em 0.1em;
- margin: 0 -0.2em;
-}
-
-#taskshow h2 {
- margin-top: -0.5em;
-}
-
-#taskshow label {
- color: #999;
-}
-
-#taskshow.status-cancelled {
- background: url(images/badge_cancelled.png) top right no-repeat;
-}
-
-#task-parent-title {
- position: relative;
- top: -0.6em;
-}
-
-a.morelink {
- font-size: 90%;
- color: #0069a6;
- text-decoration: none;
- outline: none;
-}
-
-a.morelink:hover {
- text-decoration: underline;
-}
-
-#taskedit .ui-tabs-panel {
- min-height: 24em;
-}
-
-#taskeditform input.text,
-#taskeditform textarea {
- width: 97%;
-}
-
-#taskeditform .formbuttons {
- margin: 0.5em 0;
-}
-
-#taskedit .border-after {
- padding-bottom: 0.8em;
- margin-bottom: 0.8em;
- border-bottom: 2px solid #fafafa;
-}
-
-#taskedit .edit-attendees-table {
- width: 100%;
- margin-top: 0.5em;
-}
-
-#taskedit .edit-attendees-table tbody td {
- padding: 4px 7px;
-}
-
-#taskedit .edit-attendees-table tbody tr:last-child td {
- border-bottom: 0;
-}
-
-#taskedit .edit-attendees-table th.role,
-#taskedit .edit-attendees-table td.role {
- width: 9em;
-}
-
-#taskedit .edit-attendees-table th.availability,
-#taskedit .edit-attendees-table td.availability,
-#taskedit .edit-attendees-table th.confirmstate,
-#taskedit .edit-attendees-table td.confirmstate {
- width: 6em;
-}
-
-#taskedit .edit-attendees-table th.options,
-#taskedit .edit-attendees-table td.options {
- width: 24px;
- padding: 2px 4px;
- text-align: right;
-}
-
-#taskedit .edit-attendees-table th.invite,
-#taskedit .edit-attendees-table td.invite {
- width: 48px;
- padding: 2px;
-}
-
-#taskedit .edit-attendees-table th.invite label {
- display: inline-block;
- position: relative;
- top: 4px;
- width: 24px;
- height: 18px;
- min-width: 24px;
- padding: 0;
- overflow: hidden;
- text-indent: -5000px;
- white-space: nowrap;
- background: url(images/sendinvitation.png) 1px 0 no-repeat;
-}
-
-#taskedit .edit-attendees-table th.name,
-#taskedit .edit-attendees-table td.name {
- width: auto;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- position: relative;
-}
-
-#taskedit .edit-attendees-table td.name select {
- width: 100%;
-}
-
-#taskedit .edit-attendees-table a.deletelink {
- display: inline-block;
- width: 17px;
- height: 17px;
- padding: 0;
- overflow: hidden;
- text-indent: 1000px;
-}
-
-#taskedit .edit-attendees-table a.expandlink {
- position: absolute;
- top: 4px;
- right: 6px;
- width: 16px;
- height: 16px;
-}
-
-#edit-attendees-form {
- position: relative;
- margin-top: 15px;
-}
-
-#edit-attendees-form .attendees-invitebox {
- text-align: right;
- margin: 0;
-}
-
-#edit-attendees-form .attendees-invitebox label {
- padding-right: 3px;
-}
-
-#taskedit-attachments {
- margin: 0.6em 0;
-}
-
-#taskedit-attachments ul li {
- display: block;
- color: #333;
- font-weight: bold;
- padding: 3px 4px 3px 30px;
- text-shadow: 0px 1px 1px #fff;
- text-decoration: none;
- white-space: nowrap;
- line-height: 20px;
-}
-
-#taskedit-attachments ul li a.file {
- padding: 0;
-}
-
-#taskedit-attachments-form {
- margin-top: 1em;
- padding-top: 0.8em;
- border-top: 2px solid #fafafa;
-}
-
-div.form-section {
- position: relative;
- margin-top: 0.2em;
- margin-bottom: 0.5em;
-}
-
-.form-section label {
- display: inline-block;
- min-width: 7em;
- padding-right: 0.5em;
- margin-bottom: 0.3em;
-}
-
-.tasklistview div.form-section span.task-text + label {
- margin-left: 2em;
-}
-
-label.block {
- display: block;
- margin-bottom: 0.3em;
-}
-
-#task-description {
- margin-bottom: 1em;
-}
-
-#taskedit-completeness-slider {
- display: inline-block;
- margin-left: 2em;
- width: 30em;
- height: 0.8em;
- border: 1px solid #ccc;
-}
-
-#taskedit-tagline {
- width: 97%;
-}
-
-#taskedit .droptarget {
- background-image: url(../../../../skins/larry/images/filedrop.png) !important;
- background-position: center bottom !important;
- background-repeat: no-repeat !important;
-}
-
-#taskedit .droptarget.hover,
-#taskedit .droptarget.active {
- border-color: #019bc6;
- box-shadow: 0 0 3px 2px rgba(71,135,177, 0.5);
- -moz-box-shadow: 0 0 3px 2px rgba(71,135,177, 0.5);
- -webkit-box-shadow: 0 0 3px 2px rgba(71,135,177, 0.5);
- -o-box-shadow: 0 0 3px 2px rgba(71,135,177, 0.5);
-}
-
-#taskedit .droptarget.hover {
- background-color: #d9ecf4;
- box-shadow: 0 0 5px 2px rgba(71,135,177, 0.9);
- -moz-box-shadow: 0 0 5px 2px rgba(71,135,177, 0.9);
- -webkit-box-shadow: 0 0 5px 2px rgba(71,135,177, 0.9);
- -o-box-shadow: 0 0 5px 2px rgba(71,135,177, 0.9);
-}
-
-#task-links {
- margin-top: 0;
- margin-bottom: 0.2em;
-}
-
-#task-links label {
- vertical-align: top;
- margin-top: 0.3em;
-}
-
-#task-links .attachmentslist {
- display: inline-block;
-}
-
-#task-links .attachmentslist li {
- display: inline-block;
- margin-right: 1em;
-}
-
-#taskedit-links .attachmentslist li.message.eml,
-#task-links .attachmentslist li.message.eml {
- background-image: url(sprites.png);
- background-position: -2px -388px;
-}
-
-#taskedit-links .attachmentslist li.message a.messagelink,
-#task-links .attachmentslist li.message a.messagelink {
- padding: 0 0 0 24px;
-}
-
-#taskedit-links .attachmentslist li.deleted a.messagelink,
-#taskedit-links .attachmentslist li.deleted a.messagelink:hover {
- text-decoration: line-through;
-}
-
-#taskedit-links label {
- float: left;
- margin-top: 0.3em;
-}
-
-#taskedit-links .task-text {
- margin-left: 8em;
- min-height: 22px;
-}
-
-#taskedit-links .attachmentslist li a.delete {
- top: 0;
- background-position: -6px -378px;
-}
-
-#task-attachments .attachmentslist li {
- float: left;
- margin-right: 1em;
-}
-
-#task-attachments .attachmentslist li a {
- outline: none;
-}
-
-.task-attendees span.attendee {
- padding-right: 18px;
- margin-right: 0.5em;
- background: url(images/attendee-status.png) right 0 no-repeat;
-}
-
-.task-attendees span.attendee a.mailtolink {
- text-decoration: none;
- white-space: nowrap;
- outline: none;
-}
-
-.task-attendees span.attendee a.mailtolink:hover {
- text-decoration: underline;
-}
-
-.task-attendees span.completed {
- background-position: right -20px;
-}
-
-.task-attendees span.declined {
- background-position: right -40px;
-}
-
-.task-attendees span.tentative {
- background-position: right -60px;
-}
-
-.task-attendees span.delegated {
- background-position: right -180px;
-}
-
-.task-attendees span.in-process {
- background-position: right -200px;
-}
-
-.task-attendees span.accepted {
- background-position: right -220px;
-}
-
-.task-attendees span.organizer {
- background-position: right 100px;
-}
-
-#all-task-attendees span.attendee {
- display: block;
- margin-bottom: 0.4em;
- padding-bottom: 0.3em;
- border-bottom: 1px solid #ddd;
-}
-
-.tasklistview .uidialog .tabbed {
- min-width: 600px;
-}
-
-.tasklistview .uidialog .propform fieldset.ui-tabs-panel {
- min-height: 290px;
-}
-
-.tasklistview .uidialog .propform #taskedit-tasklistame {
- width: 20em;
-}
-
-.task-dialog-message {
- margin-top: 0.5em;
- padding: 0.8em;
- border: 1px solid #ffdf0e;
- background-color: #fef893;
-}
-
-.task-dialog-message .message,
-.task-update-confirm .message {
- margin-bottom: 0.5em;
-}
-
-/* Invitation UI in mail */
-
-.messagelist tbody .attachment span.ical {
- display: inline-block;
- vertical-align: middle;
- height: 18px;
- width: 20px;
- padding: 0;
- background: url(images/ical-attachment.png) 2px 1px no-repeat;
-}
-
-div.tasklist-invitebox {
- min-height: 20px;
- margin: 5px 8px;
- padding: 3px 6px 6px 34px;
- border: 1px solid #ffdf0e;
- background: url(images/tasklist.png) 6px 5px no-repeat #fef893;
-}
-
-div.tasklist-invitebox td {
- padding: 2px;
-}
-
-div.tasklist-invitebox td.ititle {
- font-weight: bold;
- padding-right: 0.5em;
-}
-
-div.tasklist-invitebox td.label {
- color: #666;
- padding-right: 1em;
-}
-
-#task-rsvp .rsvp-buttons,
-#task-rsvp .itip-reply-controls,
-div.tasklist-invitebox .itip-buttons div {
- margin-top: 0.5em;
-}
-
-#task-rsvp .itip-reply-controls a,
-#task-rsvp .itip-reply-controls label {
- color: #333;
-}
-
-#task-rsvp input.button,
-div.tasklist-invitebox input.button {
- font-weight: bold;
- margin-right: 0.5em;
-}
-
-div.tasklist-invitebox .folder-select {
- font-weight: 10px;
- margin-left: 1em;
-}
-
-div.tasklist-invitebox .rsvp-status {
- padding-left: 2px;
-}
-
-div.tasklist-invitebox .rsvp-status.loading {
- color: #666;
- padding: 1px 0 2px 24px;
- background: url(images/loading_blue.gif) top left no-repeat;
-}
-
-div.tasklist-invitebox .rsvp-status.hint {
- color: #666;
- text-shadow: none;
- font-style: italic;
-}
-
-#task-partstat .changersvp,
-.tasklistview .edit-attendees-table td.confirmstate span,
-div.tasklist-invitebox .rsvp-status.declined,
-div.tasklist-invitebox .rsvp-status.tentative,
-div.tasklist-invitebox .rsvp-status.accepted,
-div.tasklist-invitebox .rsvp-status.delegated,
-div.tasklist-invitebox .rsvp-status.in-process,
-div.tasklist-invitebox .rsvp-status.completed,
-div.tasklist-invitebox .rsvp-status.needs-action {
- padding: 0 0 1px 22px;
- background: url(images/attendee-status.png) 2px -20px no-repeat;
-}
-
-#task-partstat .changersvp.declined,
-div.tasklist-invitebox .rsvp-status.declined,
-.tasklistview .edit-attendees-table td.confirmstate span.declined {
- background-position: 2px -40px;
-}
-
-#task-partstat .changersvp.tentative,
-div.tasklist-invitebox .rsvp-status.tentative,
-.tasklistview .edit-attendees-table td.confirmstate span.tentative {
- background-position: 2px -60px;
-}
-
-#task-partstat .changersvp.delegated,
-div.tasklist-invitebox .rsvp-status.delegated,
-.tasklistview .edit-attendees-table td.confirmstate span.delegated {
- background-position: 2px -180px;
-}
-
-#task-partstat .changersvp.needs-action,
-div.tasklist-invitebox .rsvp-status.needs-action,
-.tasklistview .edit-attendees-table td.confirmstate span.needs-action {
- background-position: 2px 0;
-}
-
-#task-partstat .changersvp.in-process,
-div.tasklist-invitebox .rsvp-status.in-process,
-.tasklistview .edit-attendees-table td.confirmstate span.in-process {
- background-position: 2px -200px;
-}
-
-#task-partstat .changersvp.accepted,
-div.tasklist-invitebox .rsvp-status.accepted,
-.tasklistview .edit-attendees-table td.confirmstate span.accepted {
- background-position: 2px -220px;
-}
-
-div.messagetasklinks {
- position: relative;
- margin: 8px 8px;
- padding: 4px 8px 4px 30px;
- border: 1px solid #dfdfdf;
- background: #fafafa;
- border-radius: 4px;
-}
-
-div.messagetasklinks::before {
- content: " ";
- position: absolute;
- top: 4px;
- left: 8px;
- width: 18px;
- height: 18px;
- background: url(buttons.png) -6px -115px no-repeat;
-}
-
-div.messagetasklinks ul.tasklist {
- margin: 0;
- padding: 0;
- list-style: none;
-}
-
-div.messagetasklinks .messagetaskref {
- display: block;
- margin-bottom: 2px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-div.messagetasklinks a.messagetasklink {
- position: relative;
- display: inline-block;
- color: #333;
- font-weight: bold;
- padding: 3px 0 2px 2px;
- text-shadow: 0px 1px 1px #fff;
- text-decoration: none;
- white-space: nowrap;
- vertical-align: middle;
-}
-
-div.messagetasklinks .messagetaskref.complete a.messagetasklink {
- text-decoration: line-through;
- text-shadow: none;
- color: #666;
-}
-
-div.messagetasklinks .messagetaskref input.complete {
- vertical-align: middle;
-}
-
-
-/** Special hacks for IE7 **/
-/** They need to be in this file to also affect the task-create dialog embedded in mail view **/
-
-html.ie7 #taskedit-completeness-slider {
- display: inline;
-}
diff --git a/plugins/tasklist/tasklist.php b/plugins/tasklist/tasklist.php
index 1c88429..d65507e 100644
--- a/plugins/tasklist/tasklist.php
+++ b/plugins/tasklist/tasklist.php
@@ -72,6 +72,7 @@ class tasklist extends rcube_plugin
function init()
{
$this->require_plugin('libcalendaring');
+ $this->require_plugin('jqueryui');
$this->rc = rcube::get_instance();
$this->lib = libcalendaring::get_instance();
@@ -1253,7 +1254,6 @@ class tasklist extends rcube_plugin
$script_add .= rcmail_output::JS_OBJECT_NAME . ".gui_object('$obj', '$id');\n";
}
- echo html::tag('link', array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => $this->url($this->local_skin_path() . '/tagedit.css'), 'nl' => true));
echo html::tag('script', array('type' => 'text/javascript'),
rcmail_output::JS_OBJECT_NAME . ".set_env(" . json_encode($env) . ");\n".
rcmail_output::JS_OBJECT_NAME . ".add_label(" . json_encode($texts) . ");\n".
diff --git a/plugins/tasklist/tasklist_base.js b/plugins/tasklist/tasklist_base.js
index b5ea06e..67bfe15 100644
--- a/plugins/tasklist/tasklist_base.js
+++ b/plugins/tasklist/tasklist_base.js
@@ -51,7 +51,6 @@ function rcube_tasklist(settings)
if (!ui_loaded) {
$.when(
$.getScript('./plugins/tasklist/tasklist.js'),
- $.getScript('./plugins/tasklist/jquery.tagedit.js'),
$.get(rcmail.url('tasks/inlineui'), function(html){ $(document.body).append(html); }, 'html')
).then(function() {
// register attachments form
diff --git a/plugins/tasklist/tasklist_ui.php b/plugins/tasklist/tasklist_ui.php
index 1395148..2308d46 100644
--- a/plugins/tasklist/tasklist_ui.php
+++ b/plugins/tasklist/tasklist_ui.php
@@ -56,6 +56,8 @@ class tasklist_ui
$this->plugin->include_stylesheet($this->plugin->local_skin_path() . '/tasklist.css');
if ($this->rc->task == 'mail' || $this->rc->task == 'tasks') {
+ jqueryui::tagedit();
+
$this->plugin->include_script('tasklist_base.js');
// copy config to client
@@ -155,7 +157,8 @@ class tasklist_ui
$this->plugin->register_handler('plugin.edit_attendees_notify', array($this, 'edit_attendees_notify'));
$this->plugin->register_handler('plugin.task_rsvp_buttons', array($this->plugin->itip, 'itip_rsvp_buttons'));
- $this->plugin->include_script('jquery.tagedit.js');
+ jqueryui::tagedit();
+
$this->plugin->include_script('tasklist.js');
$this->rc->output->include_script('treelist.js');
@@ -163,8 +166,6 @@ class tasklist_ui
if (in_array('libkolab', $this->plugin->api->loaded_plugins())) {
$this->plugin->api->include_script('libkolab/js/folderlist.js');
}
-
- $this->plugin->include_stylesheet($this->plugin->local_skin_path() . '/tagedit.css');
}
/**
More information about the commits
mailing list