diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2012-04-15 18:37:40 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2012-04-15 18:37:40 +0200 |
| commit | feb2fe055435e7ecdc657cacee2aaf7dc339dbc9 (patch) | |
| tree | 77fa07572ae7a5a2b6e808c97b9adc7f035059b3 /assets | |
| parent | ba20ededac6fd68d281603e8c9273f5134d21a4c (diff) | |
Irgendwas in der art von posts
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/1f02b218/pager.css | 67 | ||||
| -rw-r--r-- | assets/bd4d787c/editor.js | 140 | ||||
| -rw-r--r-- | assets/bd4d787c/styles.css | 15 | ||||
| -rw-r--r-- | assets/e96affe6/detailview/styles.css | 44 | ||||
| -rw-r--r-- | assets/e96affe6/gridview/bg.gif | bin | 0 -> 243 bytes | |||
| -rw-r--r-- | assets/e96affe6/gridview/delete.png | bin | 0 -> 715 bytes | |||
| -rw-r--r-- | assets/e96affe6/gridview/down.gif | bin | 0 -> 55 bytes | |||
| -rw-r--r-- | assets/e96affe6/gridview/jquery.yiigridview.js | 413 | ||||
| -rw-r--r-- | assets/e96affe6/gridview/loading.gif | bin | 0 -> 1849 bytes | |||
| -rw-r--r-- | assets/e96affe6/gridview/styles.css | 120 | ||||
| -rw-r--r-- | assets/e96affe6/gridview/up.gif | bin | 0 -> 54 bytes | |||
| -rw-r--r-- | assets/e96affe6/gridview/update.png | bin | 0 -> 713 bytes | |||
| -rw-r--r-- | assets/e96affe6/gridview/view.png | bin | 0 -> 803 bytes | |||
| -rw-r--r-- | assets/e96affe6/listview/down.gif | bin | 0 -> 55 bytes | |||
| -rw-r--r-- | assets/e96affe6/listview/jquery.yiilistview.js | 114 | ||||
| -rw-r--r-- | assets/e96affe6/listview/loading.gif | bin | 0 -> 1849 bytes | |||
| -rw-r--r-- | assets/e96affe6/listview/styles.css | 56 | ||||
| -rw-r--r-- | assets/e96affe6/listview/up.gif | bin | 0 -> 54 bytes |
18 files changed, 969 insertions, 0 deletions
diff --git a/assets/1f02b218/pager.css b/assets/1f02b218/pager.css new file mode 100644 index 0000000..1c802cc --- /dev/null +++ b/assets/1f02b218/pager.css @@ -0,0 +1,67 @@ +/** + * CSS styles for CLinkPager. + * + * @author Qiang Xue <qiang.xue@gmail.com> + * @link http://www.yiiframework.com/ + * @copyright Copyright © 2008-2010 Yii Software LLC + * @license http://www.yiiframework.com/license/ + * @version $Id: pager.css 1678 2010-01-07 21:02:00Z qiang.xue $ + * @since 1.0 + */ + +ul.yiiPager +{ + font-size:11px; + border:0; + margin:0; + padding:0; + line-height:100%; + display:inline; +} + +ul.yiiPager li +{ + display:inline; +} + +ul.yiiPager a:link, +ul.yiiPager a:visited +{ + border:solid 1px #9aafe5; + font-weight:bold; + color:#0e509e; + padding:1px 6px; + text-decoration:none; +} + +ul.yiiPager .page a +{ + font-weight:normal; +} + +ul.yiiPager a:hover +{ + border:solid 1px #0e509e; +} + +ul.yiiPager .selected a +{ + background:#2e6ab1; + color:#FFFFFF; + font-weight:bold; +} + +ul.yiiPager .hidden a +{ + border:solid 1px #DEDEDE; + color:#888888; +} + +/** + * Hide first and last buttons by default. + */ +ul.yiiPager .first, +ul.yiiPager .last +{ + display:none; +}
\ No newline at end of file diff --git a/assets/bd4d787c/editor.js b/assets/bd4d787c/editor.js new file mode 100644 index 0000000..7317d3b --- /dev/null +++ b/assets/bd4d787c/editor.js @@ -0,0 +1,140 @@ +/** + * Some browser detection + */ +var clientPC = navigator.userAgent.toLowerCase(); // Get client info +var is_gecko = ((clientPC.indexOf('gecko')!=-1) && (clientPC.indexOf('spoofer')==-1) + && (clientPC.indexOf('khtml') == -1) && (clientPC.indexOf('netscape/7.0')==-1)); +var is_safari = ((clientPC.indexOf('AppleWebKit')!=-1) && (clientPC.indexOf('spoofer')==-1)); +var is_khtml = (navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled )); +if (clientPC.indexOf('opera')!=-1) { + var is_opera = true; + var is_opera_preseven = (window.opera && !document.childNodes); + var is_opera_seven = (window.opera && document.childNodes); +} + +//{{{ insertTags +/** + * apply tagOpen/tagClose to selection in textarea, use sampleText instead + * of selection if there is none copied and adapted from phpBB + * + * @author phpBB development team + * @author MediaWiki development team + * @author Andreas Gohr <andi@splitbrain.org> + * @author Jim Raynor <jim_raynor@web.de> + */ +function insertTags(elID, tagOpen, tagClose, sampleText) { + tagOpen = tagOpen.replace(/bslashN/g,'\n'); + tagClose = tagClose.replace(/bslashN/g,'\n'); + var txtarea = document.getElementById(elID); + // IE + if(document.selection && !is_gecko) { + var theSelection = document.selection.createRange().text; + var replaced = true; + if(!theSelection){ + replaced = false; + theSelection=sampleText; + } + txtarea.focus(); + + // This has change + text = theSelection; + if(theSelection.charAt(theSelection.length - 1) == " "){// exclude ending space char, if any + theSelection = theSelection.substring(0, theSelection.length - 1); + r = document.selection.createRange(); + r.text = tagOpen + theSelection + tagClose + " "; + } else { + r = document.selection.createRange(); + r.text = tagOpen + theSelection + tagClose; + } + if(!replaced){ + r.moveStart('character',-text.length-tagClose.length); + r.moveEnd('character',-tagClose.length); + } + r.select(); + // Mozilla + } else if(txtarea.selectionStart || txtarea.selectionStart == '0') { + var replaced = false; + var startPos = txtarea.selectionStart; + var endPos = txtarea.selectionEnd; + if(endPos - startPos) replaced = true; + var scrollTop=txtarea.scrollTop; + var myText = (txtarea.value).substring(startPos, endPos); + if(!myText) { myText=sampleText;} + if(myText.charAt(myText.length - 1) == " "){ // exclude ending space char, if any + subst = tagOpen + myText.substring(0, (myText.length - 1)) + tagClose + " "; + } else { + subst = tagOpen + myText + tagClose; + } + txtarea.value = txtarea.value.substring(0, startPos) + subst + + txtarea.value.substring(endPos, txtarea.value.length); + txtarea.focus(); + + //set new selection + if(replaced){ + var cPos=startPos+(tagOpen.length+myText.length+tagClose.length); + txtarea.selectionStart=cPos; + txtarea.selectionEnd=cPos; + }else{ + txtarea.selectionStart=startPos+tagOpen.length; + txtarea.selectionEnd=startPos+tagOpen.length+myText.length; + } + txtarea.scrollTop=scrollTop; + // All others + } else { + var copy_alertText=alertText; + var re1=new RegExp("\\$1","g"); + var re2=new RegExp("\\$2","g"); + copy_alertText=copy_alertText.replace(re1,sampleText); + copy_alertText=copy_alertText.replace(re2,tagOpen+sampleText+tagClose); + var text; + if (sampleText) { + text=prompt(copy_alertText); + } else { + text=""; + } + if(!text) { text=sampleText;} + text=tagOpen+text+tagClose; + //append to the end + txtarea.value += "\n"+text; + + // in Safari this causes scrolling + if(!is_safari) { + txtarea.focus(); + } + + } + // reposition cursor if possible + if (txtarea.createTextRange) txtarea.caretPos = document.selection.createRange().duplicate(); + + return false; +} +// }}} + +// {{{ moreRows +/** + * Adds 2 more rows to a textarea + */ +function moreRows(textareaId) +{ + document.getElementById(textareaId).rows = document.getElementById(textareaId).rows + 2; +} // }}} + +// {{{ lessRows +/** + * Reduces a textarea by 2 rows + */ +function lessRows(textareaId) +{ + if( document.getElementById(textareaId).rows>2 ) + document.getElementById(textareaId).rows = document.getElementById(textareaId).rows - 2; +}// }}} + +// {{{ padText +function padText(text, length) +{ + var result=""; + for(i=0; i<length; i++) + result = result + text; + return result; +} +// }}} diff --git a/assets/bd4d787c/styles.css b/assets/bd4d787c/styles.css new file mode 100644 index 0000000..0568bd3 --- /dev/null +++ b/assets/bd4d787c/styles.css @@ -0,0 +1,15 @@ +.ddeditor .preview +{ + display: none; + border: 1px solid #aaa; + padding: 3px; +} +.ddeditor BUTTON,SELECT +{ + font-size: 9pt; +} +.ddeditor BUTTON +{ + border: 1px solid blue; + background-color: #eee; +} diff --git a/assets/e96affe6/detailview/styles.css b/assets/e96affe6/detailview/styles.css new file mode 100644 index 0000000..bc5f6d2 --- /dev/null +++ b/assets/e96affe6/detailview/styles.css @@ -0,0 +1,44 @@ +table.detail-view .null +{ + color: pink; +} + +table.detail-view +{ + background: white; + border-collapse: collapse; + width: 100%; + margin: 0; +} + +table.detail-view th, table.detail-view td +{ + font-size: 0.9em; + border: 1px white solid; + padding: 0.3em 0.6em; + vertical-align: top; +} + +table.detail-view th +{ + text-align: right; + width: 160px; +} + +table.detail-view tr.odd +{ + background:#E5F1F4; +} + +table.detail-view tr.even +{ + background:#F8F8F8; +} + +table.detail-view tr.odd th +{ +} + +table.detail-view tr.even th +{ +} diff --git a/assets/e96affe6/gridview/bg.gif b/assets/e96affe6/gridview/bg.gif Binary files differnew file mode 100644 index 0000000..4283989 --- /dev/null +++ b/assets/e96affe6/gridview/bg.gif diff --git a/assets/e96affe6/gridview/delete.png b/assets/e96affe6/gridview/delete.png Binary files differnew file mode 100644 index 0000000..dc4c12a --- /dev/null +++ b/assets/e96affe6/gridview/delete.png diff --git a/assets/e96affe6/gridview/down.gif b/assets/e96affe6/gridview/down.gif Binary files differnew file mode 100644 index 0000000..a4933b8 --- /dev/null +++ b/assets/e96affe6/gridview/down.gif diff --git a/assets/e96affe6/gridview/jquery.yiigridview.js b/assets/e96affe6/gridview/jquery.yiigridview.js new file mode 100644 index 0000000..700f247 --- /dev/null +++ b/assets/e96affe6/gridview/jquery.yiigridview.js @@ -0,0 +1,413 @@ +/** + * jQuery Yii GridView plugin file. + * + * @author Qiang Xue <qiang.xue@gmail.com> + * @link http://www.yiiframework.com/ + * @copyright Copyright © 2008-2010 Yii Software LLC + * @license http://www.yiiframework.com/license/ + * @version $Id: jquery.yiigridview.js 3486 2011-12-16 00:25:01Z mdomba $ + */ + +(function ($) { + var selectCheckedRows, methods, + gridSettings = []; + + /** + * 1. Selects rows that have checkbox checked (only checkbox that is connected with selecting a row) + * 2. Check if "check all" need to be checked/unchecked + * @return object the jQuery object + */ + selectCheckedRows = function (gridId) { + var settings = gridSettings[gridId], + table = $('#' + gridId).children('.' + settings.tableClass); + + table.children('tbody').find('input.select-on-check').filter(':checked').each(function () { + $(this).closest('tr').addClass('selected'); + }); + + table.children('thead').find('th input').filter('[type="checkbox"]').each(function () { + var name = this.name.substring(0, this.name.length - 4) + '[]', //.. remove '_all' and add '[]'' + $checks = $("input[name='" + name + "']", table); + this.checked = $checks.length > 0 && $checks.length === $checks.filter(':checked').length; + }); + return this; + }; + + methods = { + /** + * yiiGridView set function. + * @param options map settings for the grid view. Available options are as follows: + * - ajaxUpdate: array, IDs of the containers whose content may be updated by ajax response + * - ajaxVar: string, the name of the GET variable indicating the ID of the element triggering the AJAX request + * - pagerClass: string, the CSS class for the pager container + * - tableClass: string, the CSS class for the table + * - selectableRows: integer, the number of rows that can be selected + * - updateSelector: string, the selector for choosing which elements can trigger ajax requests + * - beforeAjaxUpdate: function, the function to be called before ajax request is sent + * - afterAjaxUpdate: function, the function to be called after ajax response is received + * - ajaxUpdateError: function, the function to be called if an ajax error occurs + * - selectionChanged: function, the function to be called after the row selection is changed + * @return object the jQuery object + */ + init: function (options) { + var settings = $.extend({ + ajaxUpdate: [], + ajaxVar: 'ajax', + pagerClass: 'pager', + loadingClass: 'loading', + filterClass: 'filters', + tableClass: 'items', + selectableRows: 1 + // updateSelector: '#id .pager a, '#id .grid thead th a', + // beforeAjaxUpdate: function (id) {}, + // afterAjaxUpdate: function (id, data) {}, + // selectionChanged: function (id) {}, + // url: 'ajax request URL' + }, options || {}); + + return this.each(function () { + var $grid = $(this), + id = $grid.attr('id'), + inputSelector = '#' + id + ' .' + settings.filterClass + ' input, ' + '#' + id + ' .' + settings.filterClass + ' select'; + + settings.tableClass = settings.tableClass.replace(/\s+/g, '.'); + if (settings.updateSelector === undefined) { + settings.updateSelector = '#' + id + ' .' + settings.pagerClass.replace(/\s+/g, '.') + ' a, #' + id + ' .' + settings.tableClass + ' thead th a'; + } + + gridSettings[id] = settings; + + if (settings.ajaxUpdate.length > 0) { + $(document).on('click', settings.updateSelector, function () { + $('#' + id).yiiGridView('update', {url: $(this).attr('href')}); + return false; + }); + } + + $(document).on('change', inputSelector, function () { + var data = $(inputSelector).serialize(); + if (settings.pageVar !== undefined) { + data += '&' + settings.pageVar + '=1'; + } + $('#' + id).yiiGridView('update', {data: data}); + }); + + if (settings.selectableRows > 0) { + selectCheckedRows(this.id); + $(document).on('click', '#' + id + ' .' + settings.tableClass + ' > tbody > tr', function (e) { + var $currentGrid, $row, isRowSelected, $checks, + $target = $(e.target); + + if ($target.closest('td').hasClass('button-column') || (e.target.type === 'checkbox' && !$target.hasClass('select-on-check'))) { + return; + } + + $row = $(this); + $currentGrid = $('#' + id); + $checks = $('input.select-on-check', $currentGrid); + isRowSelected = $row.toggleClass('selected').hasClass('selected'); + + if (settings.selectableRows === 1) { + $row.siblings().removeClass('selected'); + $checks.prop('checked', false); + } + $('input.select-on-check', $row).prop('checked', isRowSelected); + $("input.select-on-check-all", $currentGrid).prop('checked', $checks.length === $checks.filter(':checked').length); + + if (settings.selectionChanged !== undefined) { + settings.selectionChanged(id); + } + }); + if (settings.selectableRows > 1) { + $(document).on('click', '#' + id + ' .select-on-check-all', function () { + var $currentGrid = $('#' + id), + $checks = $('input.select-on-check', $currentGrid), + $checksAll = $('input.select-on-check-all', $currentGrid), + $rows = $currentGrid.children('.' + settings.tableClass).children('tbody').children(); + if (this.checked) { + $rows.addClass('selected'); + $checks.prop('checked', true); + $checksAll.prop('checked', true); + } else { + $rows.removeClass('selected'); + $checks.prop('checked', false); + $checksAll.prop('checked', false); + } + if (settings.selectionChanged !== undefined) { + settings.selectionChanged(id); + } + }); + } + } else { + $(document).on('click', '#' + id + ' .select-on-check', false); + } + }); + }, + + /** + * Returns the key value for the specified row + * @param row integer the row number (zero-based index) + * @return string the key value + */ + getKey: function (row) { + return this.children('.keys').children('span').eq(row).text(); + }, + + /** + * Returns the URL that generates the grid view content. + * @return string the URL that generates the grid view content. + */ + getUrl: function () { + var sUrl = gridSettings[this.attr('id')].url; + return sUrl || this.children('.keys').attr('title'); + }, + + /** + * Returns the jQuery collection of the cells in the specified row. + * @param row integer the row number (zero-based index) + * @return jQuery the jQuery collection of the cells in the specified row. + */ + getRow: function (row) { + var sClass = gridSettings[this.attr('id')].tableClass; + return this.children('.' + sClass).children('tbody').children('tr').eq(row).children(); + }, + + /** + * Returns the jQuery collection of the cells in the specified column. + * @param column integer the column number (zero-based index) + * @return jQuery the jQuery collection of the cells in the specified column. + */ + getColumn: function (column) { + var sClass = gridSettings[this.attr('id')].tableClass; + return this.children('.' + sClass).children('tbody').children('tr').children('td:nth-child(' + (column + 1) + ')'); + }, + + /** + * Performs an AJAX-based update of the grid view contents. + * @param options map the AJAX request options (see jQuery.ajax API manual). By default, + * the URL to be requested is the one that generates the current content of the grid view. + * @return object the jQuery object + */ + update: function (options) { + var customError; + if (options && options.error !== undefined) { + customError = options.error; + delete options.error; + } + + return this.each(function () { + var $form, + $grid = $(this), + id = $grid.attr('id'), + settings = gridSettings[id]; + $grid.addClass(settings.loadingClass); + + options = $.extend({ + type: 'GET', + url: $grid.yiiGridView('getUrl'), + success: function (data) { + var $data = $('<div>' + data + '</div>'); + $grid.removeClass(settings.loadingClass); + $.each(settings.ajaxUpdate, function (i, el) { + var updateId = '#' + el; + $(updateId).replaceWith($(updateId, $data)); + }); + if (settings.afterAjaxUpdate !== undefined) { + settings.afterAjaxUpdate(id, data); + } + if (settings.selectableRows > 0) { + selectCheckedRows(id); + } + }, + error: function (XHR, textStatus, errorThrown) { + var ret, err; + $grid.removeClass(settings.loadingClass); + if (XHR.readyState === 0 || XHR.status === 0) { + return; + } + if (customError !== undefined) { + ret = customError(XHR); + if (ret !== undefined && !ret) { + return; + } + } + switch (textStatus) { + case 'timeout': + err = 'The request timed out!'; + break; + case 'parsererror': + err = 'Parser error!'; + break; + case 'error': + if (XHR.status && !/^\s*$/.test(XHR.status)) { + err = 'Error ' + XHR.status; + } else { + err = 'Error'; + } + if (XHR.responseText && !/^\s*$/.test(XHR.responseText)) { + err = err + ': ' + XHR.responseText; + } + break; + } + + if (settings.ajaxUpdateError !== undefined) { + settings.ajaxUpdateError(XHR, textStatus, errorThrown, err); + } else if (err) { + alert(err); + } + } + }, options || {}); + if (options.data !== undefined && options.type === 'GET') { + options.url = $.param.querystring(options.url, options.data); + options.data = {}; + } + + if (settings.ajaxUpdate !== false) { + options.url = $.param.querystring(options.url, settings.ajaxVar + '=' + id); + if (settings.beforeAjaxUpdate !== undefined) { + settings.beforeAjaxUpdate(id, options); + } + $.ajax(options); + } else { // non-ajax mode + if (options.type === 'GET') { + window.location.href = options.url; + } else { // POST mode + $form = $('<form action="' + options.url + '" method="post"></form>').appendTo('body'); + if (options.data === undefined) { + options.data = {}; + } + + if (options.data.returnUrl === undefined) { + options.data.returnUrl = window.location.href; + } + + $.each(options.data, function (name, value) { + $form.append($('<input type="hidden" name="t" value="" />').attr('name', name).val(value)); + }); + $form.submit(); + } + } + }); + }, + + /** + * Returns the key values of the currently selected rows. + * @return array the key values of the currently selected rows. + */ + getSelection: function () { + var settings = gridSettings[this.attr('id')], + keys = this.find('.keys span'), + selection = []; + this.children('.' + settings.tableClass).children('tbody').children().each(function (i) { + if ($(this).hasClass('selected')) { + selection.push(keys.eq(i).text()); + } + }); + return selection; + }, + + /** + * Returns the key values of the currently checked rows. + * @param column_id string the ID of the column + * @return array the key values of the currently checked rows. + */ + getChecked: function (column_id) { + var settings = gridSettings[this.attr('id')], + keys = this.find('.keys span'), + checked = []; + if (column_id.substring(column_id.length - 2) !== '[]') { + column_id = column_id + '[]'; + } + this.children('.' + settings.tableClass).children('tbody').children('tr').children('td').children('input[name="' + column_id + '"]').each(function (i) { + if (this.checked) { + checked.push(keys.eq(i).text()); + } + }); + return checked; + } + }; + + $.fn.yiiGridView = function (method) { + if (methods[method]) { + return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); + } else if (typeof method === 'object' || !method) { + return methods.init.apply(this, arguments); + } else { + $.error('Method ' + method + ' does not exist on jQuery.yiiGridView'); + return false; + } + }; + +/****************************************************************************** + *** DEPRECATED METHODS + *** used before Yii 1.1.9 + ******************************************************************************/ + $.fn.yiiGridView.settings = gridSettings; + /** + * Returns the key value for the specified row + * @param id string the ID of the grid view container + * @param row integer the row number (zero-based index) + * @return string the key value + */ + $.fn.yiiGridView.getKey = function (id, row) { + return $('#' + id).yiiGridView('getKey', row); + }; + + /** + * Returns the URL that generates the grid view content. + * @param id string the ID of the grid view container + * @return string the URL that generates the grid view content. + */ + $.fn.yiiGridView.getUrl = function (id) { + return $('#' + id).yiiGridView('getUrl'); + }; + + /** + * Returns the jQuery collection of the cells in the specified row. + * @param id string the ID of the grid view container + * @param row integer the row number (zero-based index) + * @return jQuery the jQuery collection of the cells in the specified row. + */ + $.fn.yiiGridView.getRow = function (id, row) { + return $('#' + id).yiiGridView('getRow', row); + }; + + /** + * Returns the jQuery collection of the cells in the specified column. + * @param id string the ID of the grid view container + * @param column integer the column number (zero-based index) + * @return jQuery the jQuery collection of the cells in the specified column. + */ + $.fn.yiiGridView.getColumn = function (id, column) { + return $('#' + id).yiiGridView('getColumn', column); + }; + + /** + * Performs an AJAX-based update of the grid view contents. + * @param id string the ID of the grid view container + * @param options map the AJAX request options (see jQuery.ajax API manual). By default, + * the URL to be requested is the one that generates the current content of the grid view. + */ + $.fn.yiiGridView.update = function (id, options) { + $('#' + id).yiiGridView('update', options); + }; + + /** + * Returns the key values of the currently selected rows. + * @param id string the ID of the grid view container + * @return array the key values of the currently selected rows. + */ + $.fn.yiiGridView.getSelection = function (id) { + return $('#' + id).yiiGridView('getSelection'); + }; + + /** + * Returns the key values of the currently checked rows. + * @param id string the ID of the grid view container + * @param column_id string the ID of the column + * @return array the key values of the currently checked rows. + */ + $.fn.yiiGridView.getChecked = function (id, column_id) { + return $('#' + id).yiiGridView('getChecked', column_id); + }; +})(jQuery);
\ No newline at end of file diff --git a/assets/e96affe6/gridview/loading.gif b/assets/e96affe6/gridview/loading.gif Binary files differnew file mode 100644 index 0000000..5b33f7e --- /dev/null +++ b/assets/e96affe6/gridview/loading.gif diff --git a/assets/e96affe6/gridview/styles.css b/assets/e96affe6/gridview/styles.css new file mode 100644 index 0000000..d304d49 --- /dev/null +++ b/assets/e96affe6/gridview/styles.css @@ -0,0 +1,120 @@ +.grid-view-loading +{ + background:url(loading.gif) no-repeat; +} + +.grid-view +{ + padding: 15px 0; +} + +.grid-view table.items +{ + background: white; + border-collapse: collapse; + width: 100%; + border: 1px #D0E3EF solid; +} + +.grid-view table.items th, .grid-view table.items td +{ + font-size: 0.9em; + border: 1px white solid; + padding: 0.3em; +} + +.grid-view table.items th +{ + color: white; + background: url("bg.gif") repeat-x scroll left top white; + text-align: center; +} + +.grid-view table.items th a +{ + color: #EEE; + font-weight: bold; + text-decoration: none; +} + +.grid-view table.items th a:hover +{ + color: #FFF; +} + +.grid-view table.items th a.asc +{ + background:url(up.gif) right center no-repeat; + padding-right: 10px; +} + +.grid-view table.items th a.desc +{ + background:url(down.gif) right center no-repeat; + padding-right: 10px; +} + +.grid-view table.items tr.even +{ + background: #F8F8F8; +} + +.grid-view table.items tr.odd +{ + background: #E5F1F4; +} + +.grid-view table.items tr.selected +{ + background: #BCE774; +} + +.grid-view table.items tr:hover +{ + background: #ECFBD4; +} + +.grid-view .link-column img +{ + border: 0; +} + +.grid-view .button-column +{ + text-align: center; + width: 60px; +} + +.grid-view .button-column img +{ + border: 0; +} + +.grid-view .checkbox-column +{ + width: 15px; +} + +.grid-view .summary +{ + margin: 0 0 5px 0; + text-align: right; +} + +.grid-view .pager +{ + margin: 5px 0 0 0; + text-align: right; +} + +.grid-view .empty +{ + font-style: italic; +} + +.grid-view .filters input, +.grid-view .filters select +{ + width: 100%; + border: 1px solid #ccc; +}
\ No newline at end of file diff --git a/assets/e96affe6/gridview/up.gif b/assets/e96affe6/gridview/up.gif Binary files differnew file mode 100644 index 0000000..890b038 --- /dev/null +++ b/assets/e96affe6/gridview/up.gif diff --git a/assets/e96affe6/gridview/update.png b/assets/e96affe6/gridview/update.png Binary files differnew file mode 100644 index 0000000..438b7c1 --- /dev/null +++ b/assets/e96affe6/gridview/update.png diff --git a/assets/e96affe6/gridview/view.png b/assets/e96affe6/gridview/view.png Binary files differnew file mode 100644 index 0000000..cadbec3 --- /dev/null +++ b/assets/e96affe6/gridview/view.png diff --git a/assets/e96affe6/listview/down.gif b/assets/e96affe6/listview/down.gif Binary files differnew file mode 100644 index 0000000..a4933b8 --- /dev/null +++ b/assets/e96affe6/listview/down.gif diff --git a/assets/e96affe6/listview/jquery.yiilistview.js b/assets/e96affe6/listview/jquery.yiilistview.js new file mode 100644 index 0000000..682402f --- /dev/null +++ b/assets/e96affe6/listview/jquery.yiilistview.js @@ -0,0 +1,114 @@ +/** + * jQuery Yii ListView plugin file. + * + * @author Qiang Xue <qiang.xue@gmail.com> + * @link http://www.yiiframework.com/ + * @copyright Copyright © 2008-2010 Yii Software LLC + * @license http://www.yiiframework.com/license/ + * @version $Id: jquery.yiilistview.js 3296 2011-06-22 17:15:17Z qiang.xue $ + */ + +;(function($) { + /** + * yiiListView set function. + * @param options map settings for the list view. Availablel options are as follows: + * - ajaxUpdate: array, IDs of the containers whose content may be updated by ajax response + * - ajaxVar: string, the name of the GET variable indicating the ID of the element triggering the AJAX request + * - pagerClass: string, the CSS class for the pager container + * - sorterClass: string, the CSS class for the sorter container + * - updateSelector: string, the selector for choosing which elements can trigger ajax requests + * - beforeAjaxUpdate: function, the function to be called before ajax request is sent + * - afterAjaxUpdate: function, the function to be called after ajax response is received + */ + $.fn.yiiListView = function(options) { + return this.each(function(){ + var settings = $.extend({}, $.fn.yiiListView.defaults, options || {}); + var $this = $(this); + var id = $this.attr('id'); + if(settings.updateSelector == undefined) { + settings.updateSelector = '#'+id+' .'+settings.pagerClass.replace(/\s+/g,'.')+' a, #'+id+' .'+settings.sorterClass.replace(/\s+/g,'.')+' a'; + } + $.fn.yiiListView.settings[id] = settings; + + if(settings.ajaxUpdate.length > 0) { + $(settings.updateSelector).die('click').live('click',function(){ + $.fn.yiiListView.update(id, {url: $(this).attr('href')}); + return false; + }); + } + }); + }; + + $.fn.yiiListView.defaults = { + ajaxUpdate: [], + ajaxVar: 'ajax', + pagerClass: 'pager', + loadingClass: 'loading', + sorterClass: 'sorter' + // updateSelector: '#id .pager a, '#id .sort a', + // beforeAjaxUpdate: function(id) {}, + // afterAjaxUpdate: function(id, data) {}, + // url: 'ajax request URL' + }; + + $.fn.yiiListView.settings = {}; + + /** + * Returns the key value for the specified row + * @param id string the ID of the list view container + * @param index integer the zero-based index of the data item + * @return string the key value + */ + $.fn.yiiListView.getKey = function(id, index) { + return $('#'+id+' > div.keys > span:eq('+index+')').text(); + }; + + /** + * Returns the URL that generates the list view content. + * @param id string the ID of the list view container + * @return string the URL that generates the list view content. + */ + $.fn.yiiListView.getUrl = function(id) { + var settings = $.fn.yiiListView.settings[id]; + return settings.url || $('#'+id+' > div.keys').attr('title'); + }; + + /** + * Performs an AJAX-based update of the list view contents. + * @param id string the ID of the list view container + * @param options map the AJAX request options (see jQuery.ajax API manual). By default, + * the URL to be requested is the one that generates the current content of the list view. + */ + $.fn.yiiListView.update = function(id, options) { + var settings = $.fn.yiiListView.settings[id]; + $('#'+id).addClass(settings.loadingClass); + options = $.extend({ + type: 'GET', + url: $.fn.yiiListView.getUrl(id), + success: function(data,status) { + $.each(settings.ajaxUpdate, function(i,v) { + var id='#'+v; + $(id).replaceWith($(id,'<div>'+data+'</div>')); + }); + if(settings.afterAjaxUpdate != undefined) + settings.afterAjaxUpdate(id, data); + $('#'+id).removeClass(settings.loadingClass); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + $('#'+id).removeClass(settings.loadingClass); + alert(XMLHttpRequest.responseText); + } + }, options || {}); + + if(options.data!=undefined && options.type=='GET') { + options.url = $.param.querystring(options.url, options.data); + options.data = {}; + } + options.url = $.param.querystring(options.url, settings.ajaxVar+'='+id); + + if(settings.beforeAjaxUpdate != undefined) + settings.beforeAjaxUpdate(id); + $.ajax(options); + }; + +})(jQuery);
\ No newline at end of file diff --git a/assets/e96affe6/listview/loading.gif b/assets/e96affe6/listview/loading.gif Binary files differnew file mode 100644 index 0000000..5b33f7e --- /dev/null +++ b/assets/e96affe6/listview/loading.gif diff --git a/assets/e96affe6/listview/styles.css b/assets/e96affe6/listview/styles.css new file mode 100644 index 0000000..974507c --- /dev/null +++ b/assets/e96affe6/listview/styles.css @@ -0,0 +1,56 @@ +.list-view-loading +{ + background:url(loading.gif) no-repeat; +} + +.list-view .summary +{ + margin: 0 0 5px 0; + text-align: right; +} + +.list-view .sorter +{ + margin: 0 0 5px 0; + text-align: right; +} + +.list-view .pager +{ + margin: 5px 0 0 0; + text-align: right; +} + +.list-view .sorter +{ + font-size: 0.9em; +} + +.list-view .sorter ul +{ + display: inline; + list-style-image:none; + list-style-position:outside; + list-style-type:none; + margin:0; + padding:0; +} + +.list-view .sorter li +{ + display: inline; + margin: 0 0 0 5px; + padding: 0; +} + +.list-view .sorter a.asc +{ + background:url(up.gif) right center no-repeat; + padding-right: 10px; +} + +.list-view .sorter a.desc +{ + background:url(down.gif) right center no-repeat; + padding-right: 10px; +} diff --git a/assets/e96affe6/listview/up.gif b/assets/e96affe6/listview/up.gif Binary files differnew file mode 100644 index 0000000..890b038 --- /dev/null +++ b/assets/e96affe6/listview/up.gif |
