From 94d771731a9983bbbc324caedc7cf00d723d0012 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Tue, 23 Feb 2016 17:37:56 +0100 Subject: [PATCH 001/133] Fixed issue #10509: [Security] issue when saving/loading responses on public survey --- application/helpers/frontend_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/helpers/frontend_helper.php b/application/helpers/frontend_helper.php index c654cbe18c4..d295ad69455 100644 --- a/application/helpers/frontend_helper.php +++ b/application/helpers/frontend_helper.php @@ -73,7 +73,7 @@ function loadanswers() // If survey come from reload (GET or POST); some value need to be found on saved_control, not on survey if (Yii::app()->request->getParam('loadall') == "reload") { - $oSavedSurvey=SavedControl::model()->find("identifier=:identifier AND (access_code=:access_code OR access_code=:sha256_code)",array(':identifier'=>$sLoadName,':access_code'=>md5($sLoadPass),':sha256_code'=>hash('sha256',$sLoadPass))); + $oSavedSurvey=SavedControl::model()->find("sid = :sid AND identifier=:identifier AND (access_code=:access_code OR access_code=:sha256_code)",array(':sid' => $surveyid, ':identifier'=>$sLoadName,':access_code'=>md5($sLoadPass),':sha256_code'=>hash('sha256',$sLoadPass))); // We don't need to control if we have one, because we do the test before $_SESSION['survey_'.$surveyid]['scid'] = $oSavedSurvey->scid; $_SESSION['survey_'.$surveyid]['step'] = ($oSavedSurvey->saved_thisstep>1)?$oSavedSurvey->saved_thisstep:1; From b13acb367b91694a3b49e7fe265d8d1f7fbaad5e Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Wed, 24 Feb 2016 11:47:08 +0100 Subject: [PATCH 002/133] Fixed issue: Error on udpate when using dblib database MSSQL driver --- application/helpers/update/updatedb_helper.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/helpers/update/updatedb_helper.php b/application/helpers/update/updatedb_helper.php index 4f4b96999fe..3b6217523e8 100644 --- a/application/helpers/update/updatedb_helper.php +++ b/application/helpers/update/updatedb_helper.php @@ -2250,6 +2250,7 @@ function dropPrimaryKey($sTablename) break; case 'pgsql': case 'sqlsrv': + case 'dblib': case 'mssql': $pkquery = "SELECT CONSTRAINT_NAME " ."FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS " From 331656402fadb5e41c1dde56d9fddd07ef45d46c Mon Sep 17 00:00:00 2001 From: LouisGac Date: Fri, 26 Feb 2016 16:25:24 +0100 Subject: [PATCH 003/133] Dev: 2.06lts, comfortUpdate improvements (MYSQL and key checks) --- application/config/updater_version.php | 3 - application/config/version.php | 4 +- application/models/UpdateForm.php | 26 ++- .../updater/steps/_check_local_errors.php | 27 ++- .../update/updater/welcome/_subscribe.php | 10 +- .../admin/comfortupdate/displayComfortStep.js | 213 +++++++++--------- tmp/.gitignore | 1 + 7 files changed, 165 insertions(+), 119 deletions(-) create mode 100644 tmp/.gitignore diff --git a/application/config/updater_version.php b/application/config/updater_version.php index e7a4066ee49..0a942783999 100644 --- a/application/config/updater_version.php +++ b/application/config/updater_version.php @@ -12,12 +12,9 @@ * */ - // THIS FILE SHOULD NOT BE CHANGED MANUALLY ! - $config['updaterversion'] = 6; $config['comfort_update_server_url'] = 'comfortupdate.limesurvey.org/'; $config['comfort_update_server_ssl'] = 0; return $config; - ?> diff --git a/application/config/version.php b/application/config/version.php index 82036422fbd..81ff8d4cc11 100644 --- a/application/config/version.php +++ b/application/config/version.php @@ -9,14 +9,14 @@ * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. - * + *150413 */ $config['versionnumber'] = "2.06+"; $config['dbversionnumber'] = 184; $config['buildnumber'] = ''; $config['updatable'] = true; - +//$config['updaterversion'] = 1; return $config; ?> diff --git a/application/models/UpdateForm.php b/application/models/UpdateForm.php index d32bc85af9c..087465256ac 100644 --- a/application/models/UpdateForm.php +++ b/application/models/UpdateForm.php @@ -161,10 +161,13 @@ public function getLocalChecks($destinationBuild) $checks->files = $this->_getFileSystemCheckList(); $checks->php = $this->_phpVerCheck($destinationBuild); $checks->php_modules = $this->_getModuleChecks($destinationBuild); + $checks->mysql = $this->_getMysqlChecks($destinationBuild); return $checks; } + + /** * This function check for local arrors such as readonly files/directory to update the updater itself * @@ -732,7 +735,7 @@ private function _getCheckedFile($file) if ( $file['type'] == 'A' && file_exists($this->rootdir . $file['file']) ) { //A new file, check if this already exists - $checkedfile->type = 'existingfile'; + $checkedfile->type = 'existingfile'; $checkedfile->file = $file; } @@ -879,6 +882,27 @@ private function _getModuleChecks($build) return($return); } + //a + private function _getMysqlChecks($build) + { + $checks = new stdClass(); + $dbType = Yii::app()->db->getDriverName(); + if( in_array($dbType, array('mysql', 'mysqli')) ) + { + $checks->docheck = 'do'; + $getters = '/index.php?r=updates/get-mysql-ver&build='.$build; + $mysql_requirements = $this->_performRequest($getters); + $checks->mysql_ver = $mysql_requirements->version; + $checks->local_mysql_ver = Yii::app()->db->getServerVersion(); + $checks->result = (version_compare($checks->local_mysql_ver,$checks->mysql_ver,'<'))?false:true; + } + else + { + $checks->docheck = 'pass'; + } + return($checks); + } + /** * Returns the supported protocol extension (https/http) * diff --git a/application/views/admin/update/updater/steps/_check_local_errors.php b/application/views/admin/update/updater/steps/_check_local_errors.php index 2c54c95114c..5688970a2f1 100644 --- a/application/views/admin/update/updater/steps/_check_local_errors.php +++ b/application/views/admin/update/updater/steps/_check_local_errors.php @@ -50,6 +50,30 @@ +mysql->docheck !== 'pass'): ?> + + + + + + + + + + + + + +
mysql->mysql_ver;?>" style="text-align: right"> + mysql->result): ?> + + + mysql->local_mysql_ver);?> + + +
+ + @@ -64,7 +88,6 @@ php->result): ?> - php->local_php_ver);?> @@ -157,4 +180,4 @@ \ No newline at end of file + diff --git a/application/views/admin/update/updater/welcome/_subscribe.php b/application/views/admin/update/updater/welcome/_subscribe.php index 3e2ffd619dd..8431db951c3 100644 --- a/application/views/admin/update/updater/welcome/_subscribe.php +++ b/application/views/admin/update/updater/welcome/_subscribe.php @@ -11,6 +11,14 @@ echo $serverAnswer->html; ?> +alert_message) && $serverAnswer->alert_message=="subscribe_lts"):?> + + + +

@@ -44,4 +52,4 @@ \ No newline at end of file + diff --git a/scripts/admin/comfortupdate/displayComfortStep.js b/scripts/admin/comfortupdate/displayComfortStep.js index 1592209cf30..175ab0baa7e 100644 --- a/scripts/admin/comfortupdate/displayComfortStep.js +++ b/scripts/admin/comfortupdate/displayComfortStep.js @@ -1,112 +1,105 @@ $.fn.displayComfortStep = function(options) { - // Will be used later for animation params - var defauts={}; - var params=$.extend(defauts, options); - - // we display the ComfortUpdate tab inside the global setting view - $('#settingTabs a:last').tab('show'); - - if(params.step=="updatebuttons") - { - $( "#update_tab" ).trigger( "click" ); - } - else - { - $ajaxLoader = $("#ajaxContainerLoading"); - $ajaxLoader.show(); - - $("#preUpdaterContainer").empty(); - $("#updaterLayout").show(); - $("#updaterContainer").show(); - - - - - - - // We need to know the destination build to resume any step - $destinationBuild = $('#destinationBuildForAjax').val(); - $access_token = $('#access_tokenForAjax').val(); - $url = ""; - - - $("#step0Updt").removeClass("on").addClass("off"); - - switch(params.step) { - - case "newKey": - $url = $("#newkeyurl").attr('data-url'); - $("#welcome").hide(); - $("#newKey").show(); - break; - - case "checkFiles": - $url = $("#filesystemurl").attr('data-url'); - break; - - case "checkLocalErrors": - $url = $("#checklocalerrorsurl").attr('data-url'); - break; - - case "welcome": - $url = $("#welcomeurl").attr('data-url'); - break; - - } - - - /* - $url += '?destinationBuild=' + $destinationBuild + '&access_token=' + $access_token; - $.ajax({ - - url: $url, - success: function(html) { - // We hide the loader, and we append the submit new key content - $ajaxLoader.hide(); - $("#updaterContainer").empty().append(html); - - // Menus - $("#welcome").hide(); - $("#newKey").show(); - - }, - error : function(html, statut){ - $("#preUpdaterContainer").empty(); - $("#updaterLayout").show(); - $("#updaterContainer").show(); - - $("#updaterContainer").empty().append("you have an error, or a notice, inside your local installation of limesurvey. See :
"); - $("#updaterContainer").append(html.responseText); - } - }); - */ - - // Those datas are defined in _ajaxVariables view - datas = 'destinationBuild=' + $destinationBuild + '&access_token=' + $access_token + '&'+csrf_token_name+'='+csrf_token; - - $.ajax({ - type: "POST", - data: datas, - url: $url, - success: function(html) { - // We hide the loader, and we append the submit new key content - $ajaxLoader.hide(); - $("#updaterContainer").empty().append(html); - - // Menus - - }, - error : function(html, statut){ - $("#preUpdaterContainer").empty(); - $("#updaterLayout").show(); - $("#updaterContainer").show(); - - $("#updaterContainer").empty().append("you have an error, or a notice, inside your local installation of limesurvey. See :
"); - $("#updaterContainer").append(html.responseText); - } - }); - - } - -}; \ No newline at end of file + // Will be used later for animation params + var defauts={}; + var params=$.extend(defauts, options); + + // we display the ComfortUpdate tab inside the global setting view + $('#settingTabs a:last').tab('show'); + + if(params.step=="updatebuttons") + { + $( "#update_tab" ).trigger( "click" ); + } + else + { + $ajaxLoader = $("#ajaxContainerLoading"); + $ajaxLoader.show(); + + $("#preUpdaterContainer").empty(); + $("#updaterLayout").show(); + $("#updaterContainer").show(); + + + // We need to know the destination build to resume any step + $destinationBuild = $('#destinationBuildForAjax').val(); + $access_token = $('#access_tokenForAjax').val(); + $url = ""; + + + $("#step0Updt").removeClass("on").addClass("off"); + + switch(params.step) { + + case "newKey": + $url = $("#newkeyurl").attr('data-url'); + $("#welcome").hide(); + $("#newKey").show(); + break; + + case "checkFiles": + $url = $("#filesystemurl").attr('data-url'); + break; + + case "checkLocalErrors": + $url = $("#checklocalerrorsurl").attr('data-url'); + break; + + case "welcome": + $url = $("#welcomeurl").attr('data-url'); + break; + + } + + + /* + $url += '?destinationBuild=' + $destinationBuild + '&access_token=' + $access_token; + $.ajax({ + + url: $url, + success: function(html) { + // We hide the loader, and we append the submit new key content + $ajaxLoader.hide(); + $("#updaterContainer").empty().append(html); + + // Menus + $("#welcome").hide(); + $("#newKey").show(); + + }, + error : function(html, statut){ + $("#preUpdaterContainer").empty(); + $("#updaterLayout").show(); + $("#updaterContainer").show(); + + $("#updaterContainer").empty().append("you have an error, or a notice, inside your local installation of limesurvey. See :
"); + $("#updaterContainer").append(html.responseText); + } + }); + */ + + // Those datas are defined in _ajaxVariables view + datas = 'destinationBuild=' + $destinationBuild + '&access_token=' + $access_token + '&'+csrf_token_name+'='+csrf_token; + + $.ajax({ + type: "POST", + data: datas, + url: $url, + success: function(html) { + // We hide the loader, and we append the submit new key content + $ajaxLoader.hide(); + $("#updaterContainer").empty().append(html); + + }, + error : function(html, statut){ + $("#preUpdaterContainer").empty(); + $("#updaterLayout").show(); + $("#updaterContainer").show(); + $("#updaterContainer").empty().append("you have an error, or a notice, inside your local installation of limesurvey. See :
"); + $("#updaterContainer").append(html.responseText); + } + }); + + } + +}; diff --git a/tmp/.gitignore b/tmp/.gitignore new file mode 100644 index 00000000000..ec393350ba6 --- /dev/null +++ b/tmp/.gitignore @@ -0,0 +1 @@ +/comfort_updater_cookie.txt From cadcfcea4e7576f934a420fb8c52118996c43c77 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Fri, 26 Feb 2016 16:53:42 +0100 Subject: [PATCH 004/133] Dev: restored comfortUpdate disable control --- .../update_buttons/_updatesavailable_error.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/application/views/admin/update/check_updates/update_buttons/_updatesavailable_error.php b/application/views/admin/update/check_updates/update_buttons/_updatesavailable_error.php index 4e70ba70cd0..db38f5ea123 100644 --- a/application/views/admin/update/check_updates/update_buttons/_updatesavailable_error.php +++ b/application/views/admin/update/check_updates/update_buttons/_updatesavailable_error.php @@ -37,6 +37,12 @@ $sMessage = gT('Your version is not updatable via ComfortUpdate. Please update manually.'); break; + case 'update_disable': + $sTile = gT('Error!'); + $sHeader = gT('Not updatable!'); + $sMessage = gT('comfortUpdate is disabled in your LimeSurvey configuration. Please contact your administrator for more informations.'); + break; + case 'no_build': $sTile = gT('Error!'); $sHeader = gT('No build version found!'); @@ -63,4 +69,4 @@ " role="button" aria-disabled="false"> -

\ No newline at end of file + From 85670166bdd66142904b27c3e5310885e81f78c2 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Fri, 26 Feb 2016 16:54:55 +0100 Subject: [PATCH 005/133] Dev: disabling comfortUpdate restored --- application/config/updater_version.php | 5 +- application/config/version.php | 4 +- application/models/UpdateForm.php | 111 +++++++++++++++---------- 3 files changed, 70 insertions(+), 50 deletions(-) diff --git a/application/config/updater_version.php b/application/config/updater_version.php index 0a942783999..03891b01bb6 100644 --- a/application/config/updater_version.php +++ b/application/config/updater_version.php @@ -12,9 +12,12 @@ * */ + // THIS FILE SHOULD NOT BE CHANGED MANUALLY ! + $config['updaterversion'] = 6; -$config['comfort_update_server_url'] = 'comfortupdate.limesurvey.org/'; +$config['comfort_update_server_url'] = 'comfortupdate.limesurvey.org/'; $config['comfort_update_server_ssl'] = 0; return $config; + ?> diff --git a/application/config/version.php b/application/config/version.php index 81ff8d4cc11..311636522a7 100644 --- a/application/config/version.php +++ b/application/config/version.php @@ -12,11 +12,9 @@ *150413 */ -$config['versionnumber'] = "2.06+"; +$config['versionnumber'] = "2.06lts"; $config['dbversionnumber'] = 184; $config['buildnumber'] = ''; $config['updatable'] = true; -//$config['updaterversion'] = 1; return $config; - ?> diff --git a/application/models/UpdateForm.php b/application/models/UpdateForm.php index 087465256ac..eac561a62e1 100644 --- a/application/models/UpdateForm.php +++ b/application/models/UpdateForm.php @@ -60,17 +60,26 @@ public function init() */ public function getUpdateInfo($crosscheck="1") { - if( $this->build != '' ) + if (Yii::app()->getConfig("updatable")) { - $crosscheck = (int) $crosscheck; - $getters = '/index.php?r=updates/updateinfo¤tbuild='.$this->build.'&id='.md5(getGlobalSetting('SessionName')).'&crosscheck='.$crosscheck; - $content = $this->_performRequest($getters); + if( $this->build != '' ) + { + $crosscheck = (int) $crosscheck; + $getters = '/index.php?r=updates/updateinfo¤tbuild='.$this->build.'&id='.md5(getGlobalSetting('SessionName')).'&crosscheck='.$crosscheck; + $content = $this->_performRequest($getters); + } + else + { + $content = new stdClass(); + $content->result = FALSE; + $content->error = "no_build"; + } } else { $content = new stdClass(); $content->result = FALSE; - $content->error = "no_build"; + $content->error = "update_disable"; } return $content; } @@ -533,65 +542,75 @@ public function backupDb($destionationBuild) /** * Prints the update notification * + * * @access protected * @return mixed */ public function getUpdateNotification() { - $today = new DateTime("now"); - $next_update_check = Yii::app()->session['next_update_check']; - - if (is_null($next_update_check) || ($next_update_check < $today) || is_null(Yii::app()->session['update_result']) ) + if (Yii::app()->getConfig("updatable")) { - // Turn on the alert notification - Yii::app()->session['notificationstate']=1; + $today = new DateTime("now"); + $next_update_check = Yii::app()->session['next_update_check']; - $updates = $this->getUpdateInfo('1'); - $update_available = FALSE; - if($updates->result) + if (is_null($next_update_check) || ($next_update_check < $today) || is_null(Yii::app()->session['update_result']) ) { - unset($updates->result); + // Turn on the alert notification + Yii::app()->session['notificationstate']=1; - if( count($updates) > 0) + $updates = $this->getUpdateInfo('1'); + $update_available = FALSE; + if($updates->result) { - $update_available = TRUE; - $security_update_available = FALSE; - $unstable_update_available = FALSE; - foreach( $updates as $update ) - { - if($update->security_update) - $security_update_available = TRUE; + unset($updates->result); - if($update->branch != 'master') - $unstable_update_available = TRUE; + if( count($updates) > 0) + { + $update_available = TRUE; + $security_update_available = FALSE; + $unstable_update_available = FALSE; + foreach( $updates as $update ) + { + if($update->security_update) + $security_update_available = TRUE; + + if($update->branch != 'master') + $unstable_update_available = TRUE; + } + } + Yii::app()->session['update_result'] = $update_available; + Yii::app()->session['security_update'] = $security_update_available; + + // If only one update is available and it's an unstable one, then it will be displayed in a different color, and will be removed, not minified when clicked + if( count((array)$updates) == 1 && $unstable_update_available ) + Yii::app()->session['unstable_update'] = $unstable_update_available; + else + Yii::app()->session['unstable_update'] = false; + + $next_update_check = $today->add(new DateInterval('P1D')); + Yii::app()->session['next_update_check'] = $next_update_check; + $updates = array('result'=>$update_available , 'security_update'=>$security_update_available, 'unstable_update'=>$unstable_update_available); + } + else + { + $next_update_check = $today->add(new DateInterval('P1D')); + Yii::app()->session['next_update_check'] = $next_update_check; + Yii::app()->session['update_result'] = false; } } - Yii::app()->session['update_result'] = $update_available; - Yii::app()->session['security_update'] = $security_update_available; - - // If only one update is available and it's an unstable one, then it will be displayed in a different color, and will be removed, not minified when clicked - if( count((array)$updates) == 1 && $unstable_update_available ) - Yii::app()->session['unstable_update'] = $unstable_update_available; else - Yii::app()->session['unstable_update'] = false; - - $next_update_check = $today->add(new DateInterval('P1D')); - Yii::app()->session['next_update_check'] = $next_update_check; - $updates = array('result'=>$update_available , 'security_update'=>$security_update_available, 'unstable_update'=>$unstable_update_available); - } - else - { - $next_update_check = $today->add(new DateInterval('P1D')); - Yii::app()->session['next_update_check'] = $next_update_check; - Yii::app()->session['update_result'] = false; - } + { + $update_available = Yii::app()->session['update_result']; + $security_update_available = Yii::app()->session['security_update']; + $updates = array('result'=>$update_available , 'security_update'=>$security_update_available); + } } else { - $update_available = Yii::app()->session['update_result']; - $security_update_available = Yii::app()->session['security_update']; - $updates = array('result'=>$update_available , 'security_update'=>$security_update_available); + Yii::app()->session['notificationstate']=0; + Yii::app()->session['update_result'] = false; + $updates = array('result'=>false); } return (object) $updates; } From 6811e62359cc69943f83ae0f2609e5533ac40f99 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Mon, 29 Feb 2016 14:16:59 +0100 Subject: [PATCH 006/133] Dev: comfortUpdate server, maintenance message --- application/config/updater_version.php | 3 ++- application/config/version.php | 2 +- .../update_buttons/_updatesavailable_error.php | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/application/config/updater_version.php b/application/config/updater_version.php index 03891b01bb6..845f873df3c 100644 --- a/application/config/updater_version.php +++ b/application/config/updater_version.php @@ -16,7 +16,8 @@ // THIS FILE SHOULD NOT BE CHANGED MANUALLY ! $config['updaterversion'] = 6; -$config['comfort_update_server_url'] = 'comfortupdate.limesurvey.org/'; +//$config['comfort_update_server_url'] = 'comfortupdate.limesurvey.org/'; +$config['comfort_update_server_url'] = 'web.comfortupdate.org/'; $config['comfort_update_server_ssl'] = 0; return $config; diff --git a/application/config/version.php b/application/config/version.php index 311636522a7..8af565c138d 100644 --- a/application/config/version.php +++ b/application/config/version.php @@ -14,7 +14,7 @@ $config['versionnumber'] = "2.06lts"; $config['dbversionnumber'] = 184; -$config['buildnumber'] = ''; +$config['buildnumber'] = 160232; $config['updatable'] = true; return $config; ?> diff --git a/application/views/admin/update/check_updates/update_buttons/_updatesavailable_error.php b/application/views/admin/update/check_updates/update_buttons/_updatesavailable_error.php index db38f5ea123..cd0055641b8 100644 --- a/application/views/admin/update/check_updates/update_buttons/_updatesavailable_error.php +++ b/application/views/admin/update/check_updates/update_buttons/_updatesavailable_error.php @@ -49,6 +49,12 @@ $sMessage = gT("It seems you're using a version coming from the LimeSurvey GitHub repository. You can't use ComfortUpdate."); break; + case 'maintenance': + $sTile = gT('Maintenance!'); + $sHeader = gT('The ComfortUpdate service is currently undergoing maintenance.'); + $sMessage = gT("Please have patience and retry in 30 minutes. Thank you for your understanding."); + break; + default : $sTile = gT('Error!'); $sHeader = gT('Unknown error!'); From abb574c93ab7046e4e210988d6ca0c56fbf59a93 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Mon, 29 Feb 2016 14:17:55 +0100 Subject: [PATCH 007/133] Dev: comfortUpate maintenance message --- application/helpers/qanda_helper.php | 4 ++++ tmp/.gitignore | 7 +++++++ ...0962962aa5b15c247bce765d59cd78344a488eaf,1.ser | Bin 0 -> 516 bytes 3 files changed, 11 insertions(+) create mode 100644 tmp/runtime/URI/4.6.0,0962962aa5b15c247bce765d59cd78344a488eaf,1.ser diff --git a/application/helpers/qanda_helper.php b/application/helpers/qanda_helper.php index ce98bedba72..360ef2b3b62 100644 --- a/application/helpers/qanda_helper.php +++ b/application/helpers/qanda_helper.php @@ -2634,6 +2634,10 @@ function do_multiplechoice_withcomments($ia) } $answer_main .= ' value="'.htmlspecialchars($dispVal,ENT_QUOTES).'"'; } + else + { + $value = ''; + } $fn++; // --> START NEW FEATURE - SAVE $answer_main .= " />\n\t\n\n" diff --git a/tmp/.gitignore b/tmp/.gitignore index ec393350ba6..a39863f7806 100644 --- a/tmp/.gitignore +++ b/tmp/.gitignore @@ -1 +1,8 @@ +<<<<<<< Updated upstream +======= +!index.html +!.gitignore +!assets + +>>>>>>> Stashed changes /comfort_updater_cookie.txt diff --git a/tmp/runtime/URI/4.6.0,0962962aa5b15c247bce765d59cd78344a488eaf,1.ser b/tmp/runtime/URI/4.6.0,0962962aa5b15c247bce765d59cd78344a488eaf,1.ser new file mode 100644 index 0000000000000000000000000000000000000000..f6d3e812b706751db73261e535cbc8e9e3632a7d GIT binary patch literal 516 zcmZvYK~BRk5Jh{IS+Yt}Krr4Rgjxw&L}48{?YOb(CXww3N|n1ab|OkkcJ}Cd-t%8# zc8f53e|dgwtyY?B{_!?{B&93ubzK48;nCqWfHw6XBF52$QRc(#Df@AS7lX zn{r}SJO5zhdS|rrAeJ~Cp*+Qh`FWO6J+G4c$QxP5j4Yyy6GCEw$1a*S3aRa z#S<7y6` literal 0 HcmV?d00001 From 78c7f3c1a46fbed34a24d217425d83be2bdcf874 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Mon, 29 Feb 2016 14:29:38 +0100 Subject: [PATCH 008/133] Dev: some cleaning --- application/config/updater_version.php | 2 +- application/config/version.php | 2 +- tmp/.gitignore | 4 ---- ...0962962aa5b15c247bce765d59cd78344a488eaf,1.ser | Bin 516 -> 0 bytes 4 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 tmp/runtime/URI/4.6.0,0962962aa5b15c247bce765d59cd78344a488eaf,1.ser diff --git a/application/config/updater_version.php b/application/config/updater_version.php index 845f873df3c..4fd56b245d8 100644 --- a/application/config/updater_version.php +++ b/application/config/updater_version.php @@ -17,7 +17,7 @@ $config['updaterversion'] = 6; //$config['comfort_update_server_url'] = 'comfortupdate.limesurvey.org/'; -$config['comfort_update_server_url'] = 'web.comfortupdate.org/'; +$config['comfort_update_server_url'] = 'comfortupdate.limesurvey.org/'; $config['comfort_update_server_ssl'] = 0; return $config; diff --git a/application/config/version.php b/application/config/version.php index 8af565c138d..311636522a7 100644 --- a/application/config/version.php +++ b/application/config/version.php @@ -14,7 +14,7 @@ $config['versionnumber'] = "2.06lts"; $config['dbversionnumber'] = 184; -$config['buildnumber'] = 160232; +$config['buildnumber'] = ''; $config['updatable'] = true; return $config; ?> diff --git a/tmp/.gitignore b/tmp/.gitignore index a39863f7806..ed4bad86d87 100644 --- a/tmp/.gitignore +++ b/tmp/.gitignore @@ -1,8 +1,4 @@ -<<<<<<< Updated upstream -======= !index.html !.gitignore !assets - ->>>>>>> Stashed changes /comfort_updater_cookie.txt diff --git a/tmp/runtime/URI/4.6.0,0962962aa5b15c247bce765d59cd78344a488eaf,1.ser b/tmp/runtime/URI/4.6.0,0962962aa5b15c247bce765d59cd78344a488eaf,1.ser deleted file mode 100644 index f6d3e812b706751db73261e535cbc8e9e3632a7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 516 zcmZvYK~BRk5Jh{IS+Yt}Krr4Rgjxw&L}48{?YOb(CXww3N|n1ab|OkkcJ}Cd-t%8# zc8f53e|dgwtyY?B{_!?{B&93ubzK48;nCqWfHw6XBF52$QRc(#Df@AS7lX zn{r}SJO5zhdS|rrAeJ~Cp*+Qh`FWO6J+G4c$QxP5j4Yyy6GCEw$1a*S3aRa z#S<7y6` From ec7819f33461d664777066fc8099cb29379dbdc0 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Mon, 29 Feb 2016 17:09:51 +0100 Subject: [PATCH 009/133] Release 2.06+LTS Build 160229 --- docs/release_notes.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/release_notes.txt b/docs/release_notes.txt index 90a3e34b071..f10b1a1a750 100644 --- a/docs/release_notes.txt +++ b/docs/release_notes.txt @@ -59,6 +59,9 @@ Thank you to everyone who helped with this new release! CHANGE LOG ------------------------------------------------------ +Changes from 2.06+ (build 160123) to 2.06LTS (build 160229) Feb 29, 2016 +Fixed issue: Error on update when using dblib database MSSQL driver (c_schmitz) +Fixed issue #10509: [Security] issue when saving/loading responses on public survey (c_schmitz) Changes from 2.06+ (build 160123) to 2.06+ (build 160129) Jan 29, 2016 -Fixed issue #10233: Unable to add user to a group in a fresh install (Carsten Schmitz) From 503c0d10b60a40839d42f1e02988be79816f8b1c Mon Sep 17 00:00:00 2001 From: LouisGac Date: Tue, 1 Mar 2016 10:00:50 +0100 Subject: [PATCH 010/133] Dev: comfortUpdate, clean session and config as a last step --- application/config/version.php | 2 +- application/controllers/AdminController.php | 3 +- application/core/Survey_Common_Action.php | 38 ++++++++++----------- application/models/UpdateForm.php | 6 +++- 4 files changed, 27 insertions(+), 22 deletions(-) diff --git a/application/config/version.php b/application/config/version.php index 311636522a7..4f73816493d 100644 --- a/application/config/version.php +++ b/application/config/version.php @@ -14,7 +14,7 @@ $config['versionnumber'] = "2.06lts"; $config['dbversionnumber'] = 184; -$config['buildnumber'] = ''; +$config['buildnumber'] = 160229; $config['updatable'] = true; return $config; ?> diff --git a/application/controllers/AdminController.php b/application/controllers/AdminController.php index 3e366782ee9..eed4a7652bf 100644 --- a/application/controllers/AdminController.php +++ b/application/controllers/AdminController.php @@ -319,7 +319,8 @@ public function _getAdminFooter($url, $explanation, $return = false) $aData['versionnumber'] = Yii::app()->getConfig("versionnumber"); $aData['buildtext'] = ""; - if(Yii::app()->getConfig("buildnumber")!="") { + if(Yii::app()->getConfig("buildnumber")!="") + { $aData['buildtext']= "Build ".Yii::app()->getConfig("buildnumber"); } diff --git a/application/core/Survey_Common_Action.php b/application/core/Survey_Common_Action.php index a1ded9c33e4..b6030f556ab 100644 --- a/application/core/Survey_Common_Action.php +++ b/application/core/Survey_Common_Action.php @@ -246,11 +246,11 @@ protected function _renderWrappedTemplate($sAction = '', $aViewUrls = array(), $ // Menu bars if (!isset($aData['display']['menu_bars']) || ($aData['display']['menu_bars'] !== false && (!is_array($aData['display']['menu_bars']) || !in_array('browse', array_keys($aData['display']['menu_bars']))))) { - if(!isset($aData['updatedbaction'])) - { - $this->_updatenotification(); - Yii::app()->getController()->_showadminmenu(!empty($aData['surveyid']) ? $aData['surveyid'] : null); - } + if(!isset($aData['updatedbaction'])) + { + $this->_updatenotification(); + Yii::app()->getController()->_showadminmenu(!empty($aData['surveyid']) ? $aData['surveyid'] : null); + } if (!empty($aData['surveyid'])) { @@ -355,19 +355,19 @@ protected function _renderWrappedTemplate($sAction = '', $aViewUrls = array(), $ } - function _updatenotification() - { - if( !Yii::app()->user->isGuest ) - { - $updateModel = new UpdateForm(); - $updateNotification = $updateModel->updateNotification; - - if($updateNotification->result) - { - return $this->getController()->renderPartial("/admin/update/_update_notification", array('security_update_available'=>$updateNotification->security_update)); - } - } - } + function _updatenotification() + { + if( !Yii::app()->user->isGuest ) + { + $updateModel = new UpdateForm(); + $updateNotification = $updateModel->updateNotification; + + if($updateNotification->result) + { + return $this->getController()->renderPartial("/admin/update/_update_notification", array('security_update_available'=>$updateNotification->security_update)); + } + } + } /** * Shows admin menu for question @@ -382,7 +382,7 @@ function _questionbar($iSurveyID, $gid, $qid, $action = null) //Show Question Details $qrrow = Question::model()->findByAttributes(array('qid' => $qid, 'gid' => $gid, 'sid' => $iSurveyID, 'language' => $baselang)); - if (is_null($qrrow)) + if (is_null($qrrow)) return; // Throw 404 .... diff --git a/application/models/UpdateForm.php b/application/models/UpdateForm.php index eac561a62e1..146602d0479 100644 --- a/application/models/UpdateForm.php +++ b/application/models/UpdateForm.php @@ -79,7 +79,7 @@ public function getUpdateInfo($crosscheck="1") { $content = new stdClass(); $content->result = FALSE; - $content->error = "update_disable"; + $content->error = "update_disable"; } return $content; } @@ -378,6 +378,7 @@ public function updateVersion($destinationBuild) fwrite($handle,$line); } fclose($handle); + Yii::app()->setConfig("buildnumber", $destinationBuild); } /** @@ -389,6 +390,9 @@ public function destroyGlobalSettings() setGlobalSetting('updateavailable','0'); setGlobalSetting('updatebuild',''); setGlobalSetting('updateversions',''); + Yii::app()->session['update_result']=null; + Yii::app()->session['next_update_check']=null; + } /** From b7fd28ee1fcfe8c6c0896d9b953711f96cfc0348 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Tue, 1 Mar 2016 10:12:03 +0100 Subject: [PATCH 011/133] Dev: cleaning on update controller and update model --- application/controllers/admin/update.php | 90 ++++++----- application/models/UpdateForm.php | 181 ++++++++++++----------- 2 files changed, 142 insertions(+), 129 deletions(-) diff --git a/application/controllers/admin/update.php b/application/controllers/admin/update.php index c5edb08ac26..80d70ffe846 100755 --- a/application/controllers/admin/update.php +++ b/application/controllers/admin/update.php @@ -1,5 +1,5 @@ hasGlobalPermission('superadmin')) + if (Permission::model()->hasGlobalPermission('superadmin')) { // We get the update key in the database. If it's empty, getWelcomeMessage will return subscription $updateKey = getGlobalSetting("update_key"); @@ -108,10 +108,10 @@ public function getwelcome() */ public function checkLocalErrors() { - if(Permission::model()->hasGlobalPermission('superadmin')) + if (Permission::model()->hasGlobalPermission('superadmin')) { // We use request rather than post, because this step can be called by url by displayComfortStep.js - if( isset($_REQUEST['destinationBuild']) ) + if (isset($_REQUEST['destinationBuild']) ) { $destinationBuild = $_REQUEST['destinationBuild']; $access_token = $_REQUEST['access_token']; @@ -135,33 +135,32 @@ public function checkLocalErrors() */ public function changeLog() { - if(Permission::model()->hasGlobalPermission('superadmin')) + if (Permission::model()->hasGlobalPermission('superadmin')) { // We use request rather than post, because this step can be called by url by displayComfortStep.js - if( isset($_REQUEST['destinationBuild']) ) + if (isset($_REQUEST['destinationBuild']) ) { - $destinationBuild = $_REQUEST['destinationBuild']; $access_token = $_REQUEST['access_token']; - // We get the change log from the ComfortUpdate server - $updateModel = new UpdateForm(); - $changelog = $updateModel->getChangeLog( $destinationBuild ); + // We get the change log from the ComfortUpdate server + $updateModel = new UpdateForm(); + $changelog = $updateModel->getChangeLog( $destinationBuild ); - if( $changelog->result ) - { - $aData['errors'] = FALSE; - $aData['changelogs'] = $changelog; - $aData['html_from_server'] = $changelog->html; - $aData['destinationBuild'] = $destinationBuild; - $aData['access_token'] = $access_token; - } - else - { - return $this->_renderError($changelog); - } - return $this->controller->renderPartial('update/updater/steps/_change_log', $aData, false, false); + if ($changelog->result ) + { + $aData['errors'] = FALSE; + $aData['changelogs'] = $changelog; + $aData['html_from_server'] = $changelog->html; + $aData['destinationBuild'] = $destinationBuild; + $aData['access_token'] = $access_token; + } + else + { + return $this->_renderError($changelog); + } + return $this->controller->renderPartial('update/updater/steps/_change_log', $aData, false, false); } return $this->_renderErrorString("unknown_destination_build"); } @@ -174,10 +173,10 @@ public function changeLog() */ public function fileSystem() { - if(Permission::model()->hasGlobalPermission('superadmin')) + if (Permission::model()->hasGlobalPermission('superadmin')) { - if( isset($_REQUEST['destinationBuild'])) + if (isset($_REQUEST['destinationBuild'])) { $tobuild = $_REQUEST['destinationBuild']; $access_token = $_REQUEST['access_token']; @@ -186,9 +185,8 @@ public function fileSystem() $updateModel = new UpdateForm(); $changedFiles = $updateModel->getChangedFiles($tobuild); - if( $changedFiles->result ) + if ($changedFiles->result ) { - //TODO : clean that $aData = $updateModel->getFileStatus($changedFiles->files); $aData['html_from_server'] = ( isset($changedFiles->html) )?$changedFiles->html:''; @@ -211,21 +209,21 @@ public function fileSystem() */ public function backup() { - if(Permission::model()->hasGlobalPermission('superadmin')) + if (Permission::model()->hasGlobalPermission('superadmin')) { - if(Yii::app()->request->getPost('destinationBuild')) + if (Yii::app()->request->getPost('destinationBuild')) { $destinationBuild = Yii::app()->request->getPost('destinationBuild'); - $access_token = $_REQUEST['access_token']; + $access_token = $_REQUEST['access_token']; - if(Yii::app()->request->getPost('datasupdateinfo')) + if (Yii::app()->request->getPost('datasupdateinfo')) { $updateinfos= unserialize ( base64_decode( ( Yii::app()->request->getPost('datasupdateinfo') ))); $updateModel = new UpdateForm(); $backupInfos = $updateModel->backupFiles($updateinfos); - if( $backupInfos->result ) + if ($backupInfos->result ) { $dbBackupInfos = $updateModel->backupDb($destinationBuild); // If dbBackup fails, it will just provide a warning message : backup manually @@ -270,7 +268,7 @@ function step4() $destinationBuild = Yii::app()->request->getPost('destinationBuild'); $access_token = $_REQUEST['access_token']; - if( Yii::app()->request->getPost('datasupdateinfo') ) + if ( Yii::app()->request->getPost('datasupdateinfo') ) { $updateinfos = unserialize ( base64_decode( ( Yii::app()->request->getPost('datasupdateinfo') ))); @@ -278,13 +276,13 @@ function step4() $updateModel = new UpdateForm(); $file = $updateModel->downloadUpdateFile($access_token, $destinationBuild); - if( $file->result ) + if ($file->result ) { $unzip = $updateModel->unzipUpdateFile(); - if( $unzip->result ) + if ($unzip->result ) { $remove = $updateModel->removeDeletedFiles($updateinfos); - if( $remove->result ) + if ($remove->result ) { // Should never bug (version.php is checked before)) $updateModel->updateVersion($destinationBuild); @@ -338,21 +336,21 @@ public function updateUpdater() { if (Permission::model()->hasGlobalPermission('superadmin')) { - if( Yii::app()->request->getPost('destinationBuild') ) + if ( Yii::app()->request->getPost('destinationBuild') ) { $destinationBuild = Yii::app()->request->getPost('destinationBuild'); $updateModel = new UpdateForm(); $localChecks = $updateModel->getLocalChecksForUpdater(); - if( $localChecks->result ) + if ($localChecks->result ) { $file = $updateModel->downloadUpdateUpdaterFile($destinationBuild); - if( $file->result ) + if ($file->result ) { $unzip = $updateModel->unzipUpdateUpdaterFile(); - if( $unzip->result ) + if ($unzip->result ) { $updateModel->removeTmpFile('update_updater.zip'); $updateModel->removeTmpFile('comfort_updater_cookie.txt'); @@ -404,14 +402,14 @@ public function submitkey() if (Permission::model()->hasGlobalPermission('superadmin')) { - if( Yii::app()->request->getPost('keyid') ) + if ( Yii::app()->request->getPost('keyid') ) { // We trim it, just in case user added a space... $submittedUpdateKey = trim(Yii::app()->request->getPost('keyid')); $updateModel = new UpdateForm(); $check = $updateModel->checkUpdateKeyonServer($submittedUpdateKey); - if( $check->result ) + if ($check->result ) { // If the key is validated by server, we update the local database with this key $updateKey = $updateModel->setUpdateKey($submittedUpdateKey); @@ -437,7 +435,7 @@ public function submitkey() public function db($continue = null) { Yii::app()->loadHelper("update/update"); - if(isset($continue) && $continue=="yes") + if (isset($continue) && $continue=="yes") { $aViewUrls['output'] = CheckForDBUpgrades($continue); $aData['display']['header'] = false; @@ -489,7 +487,7 @@ private function _getButtons($crosscheck) // TODO : if no update available, set session about it... - if( $serverAnswer->result ) + if ($serverAnswer->result ) { unset($serverAnswer->result); return $this->controller->renderPartial('//admin/update/check_updates/update_buttons/_updatesavailable', array('updateInfos' => $serverAnswer), false, false); @@ -505,11 +503,11 @@ private function _getButtons($crosscheck) */ private function _renderWelcome($serverAnswer) { - if( $serverAnswer->result ) + if ($serverAnswer->result ) { // Available views (in /admin/update/welcome/ ) $views = array('welcome', 'subscribe', 'key_updated', 'updater_update'); - if( in_array($serverAnswer->view, $views) ) + if (in_array($serverAnswer->view, $views) ) { return $this->controller->renderPartial('//admin/update/updater/welcome/_'.$serverAnswer->view, array('serverAnswer' => $serverAnswer), false, false); } diff --git a/application/models/UpdateForm.php b/application/models/UpdateForm.php index 146602d0479..5cff8d98645 100644 --- a/application/models/UpdateForm.php +++ b/application/models/UpdateForm.php @@ -1,5 +1,5 @@ getConfig("updatable")) { - if( $this->build != '' ) + if ($this->build != '') { $crosscheck = (int) $crosscheck; $getters = '/index.php?r=updates/updateinfo¤tbuild='.$this->build.'&id='.md5(getGlobalSetting('SessionName')).'&crosscheck='.$crosscheck; @@ -92,8 +92,10 @@ public function getUpdateInfo($crosscheck="1") public function getWelcomeMessage($updateKey=NULL, $destinationBuild) { // First, we destroy any previous cookie : - if ( file_exists(realpath($this->path_cookie)) ) + if (file_exists(realpath($this->path_cookie))) + { unlink( $this->path_cookie ); + } $updater_version = Yii::app()->getConfig("updaterversion"); touch($this->path_cookie); @@ -128,7 +130,7 @@ public function setUpdateKey($submittedUpdateKey) $submittedUpdateKey = trim(htmlspecialchars(addslashes($submittedUpdateKey))); $updateKey = SettingGlobal::model()->findByPk('update_key'); - if(!$updateKey) + if (!$updateKey) { // Create $updateKey = new SettingGlobal(); @@ -142,7 +144,7 @@ public function setUpdateKey($submittedUpdateKey) $result = SettingGlobal::model()->updateByPk( 'update_key', array('stg_value'=>$submittedUpdateKey)); } - if($result) + if ($result) { // If success we return the updatekey row $updateKey = SettingGlobal::model()->findByPk('update_key'); @@ -194,17 +196,19 @@ public function getLocalChecksForUpdater() $lsRootPath = dirname(Yii::app()->request->scriptFile).'/'; foreach( $toCheck as $check ) { - if(file_exists( $lsRootPath . $check )) + if (file_exists( $lsRootPath . $check )) { - if( !is_writable( $lsRootPath . $check ) ) + if (!is_writable( $lsRootPath . $check ) ) { $readOnly[] = $lsRootPath . $check ; } } } - if( count($readOnly) <= 0 ) + if ( count($readOnly) <= 0 ) + { return (object) array('result'=>TRUE); + } return (object) array('result'=>FALSE, 'readOnly'=>$readOnly); } @@ -312,11 +316,11 @@ public function removeDeletedFiles($updateinfos) foreach ( $updateinfos as $file ) { $sFileToDelete = str_replace("..", "", $file->file); - if ( $file->type =='D' && file_exists($this->rootdir.$sFileToDelete) ) + if ($file->type =='D' && file_exists($this->rootdir.$sFileToDelete) ) { - if( is_file($this->rootdir.$sFileToDelete ) ) + if ( is_file($this->rootdir.$sFileToDelete ) ) { - if( ! @unlink($this->rootdir.$sFileToDelete) ) + if (! @unlink($this->rootdir.$sFileToDelete) ) { $return = array('result'=>FALSE, 'error'=>'cant_remove_deleted_files', 'message'=>'file : '.$sFileToDelete); return (object) $return; @@ -324,7 +328,7 @@ public function removeDeletedFiles($updateinfos) } else { - if( ! rmdir($this->rootdir.$sFileToDelete) ) + if (! rmdir($this->rootdir.$sFileToDelete) ) { $return = array('result'=>FALSE, 'error'=>'cant_remove_deleted_directory', 'message'=>'dir : '.$sFileToDelete); return (object) $return; @@ -346,7 +350,7 @@ public function removeTmpFile($sTmpFile = 'update.zip') $sTmpFilePath = $this->tempdir.DIRECTORY_SEPARATOR.$sTmpFile; if ( file_exists( $sTmpFilePath ) ) { - if( ! @unlink( $sTmpFilePath ) ) + if (! @unlink( $sTmpFilePath ) ) { $return = array('result'=>FALSE, 'error'=>'cant_remove_update_file', 'message'=>'file : '.$sTmpFilePath); return (object) $return; @@ -371,7 +375,7 @@ public function updateVersion($destinationBuild) $handle = fopen($this->rootdir.DIRECTORY_SEPARATOR.'application'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'version.php', "w"); foreach ($versionlines as $line) { - if(strpos($line,'buildnumber')!==false) + if (strpos($line,'buildnumber')!==false) { $line='$config[\'buildnumber\'] = '.$destinationBuild.';'."\r\n"; } @@ -392,7 +396,6 @@ public function destroyGlobalSettings() setGlobalSetting('updateversions',''); Yii::app()->session['update_result']=null; Yii::app()->session['next_update_check']=null; - } /** @@ -402,45 +405,45 @@ public function destroyGlobalSettings() */ public function getFileStatus($updateinfo) { - $existingfiles = array(); $modifiedfiles = array(); $readonlyfiles = array(); + $existingfiles = array(); $modifiedfiles = array(); $readonlyfiles = array(); - foreach ( $updateinfo as $file ) - { - $file = (array) $file; - $readonly_checked_file = $this->_getReadOnlyCheckedFile($file); + foreach ( $updateinfo as $file ) + { + $file = (array) $file; + $readonly_checked_file = $this->_getReadOnlyCheckedFile($file); - if($readonly_checked_file->type == 'readonlyfile') - { - $readonlyfiles[] = $readonly_checked_file->file; - } + if ($readonly_checked_file->type == 'readonlyfile') + { + $readonlyfiles[] = $readonly_checked_file->file; + } - $checkedfile = $this->_getCheckedFile($file); - switch ($checkedfile->type) { - case 'modifiedfile': - $modifiedfiles[] = $checkedfile->file; - break; + $checkedfile = $this->_getCheckedFile($file); + switch ($checkedfile->type) { + case 'modifiedfile': + $modifiedfiles[] = $checkedfile->file; + break; - case 'existingfile': - $existingfiles[] = $checkedfile->file; - } + case 'existingfile': + $existingfiles[] = $checkedfile->file; } + } - // Format the array for presentation in the view - if(count($readonlyfiles)) + // Format the array for presentation in the view + if (count($readonlyfiles)) + { + foreach (array_unique($readonlyfiles) as $aFile) { - foreach (array_unique($readonlyfiles) as $aFile) - { - $aReadOnlyFiles[]=substr($aFile,strlen(Yii::app()->getConfig("rootdir"))); - } - sort($aReadOnlyFiles); - $readonlyfiles=$aReadOnlyFiles; + $aReadOnlyFiles[]=substr($aFile,strlen(Yii::app()->getConfig("rootdir"))); } + sort($aReadOnlyFiles); + $readonlyfiles=$aReadOnlyFiles; + } - return array( - 'readonlyfiles'=>$readonlyfiles, - 'modifiedfiles'=>$modifiedfiles, - 'existingfiles'=>$existingfiles - ); + return array( + 'readonlyfiles'=>$readonlyfiles, + 'modifiedfiles'=>$modifiedfiles, + 'existingfiles'=>$existingfiles + ); } /** @@ -470,7 +473,7 @@ public function backupFiles($updateinfos) $v_list = $archive->add($filestozip, PCLZIP_OPT_REMOVE_PATH, $this->publicdir); $backup = new stdClass(); - if ( ! $v_list == 0) + if (! $v_list == 0) { $backup->result = TRUE; $backup->basefilename = $basefilename; @@ -497,7 +500,7 @@ public function backupDb($destionationBuild) // We backup only mysql/mysqli database // TODO : add postgresql - if( in_array($dbType, array('mysql', 'mysqli')) && Yii::app()->getConfig('demoMode') != true ) + if ( in_array($dbType, array('mysql', 'mysqli')) && Yii::app()->getConfig('demoMode') != true ) { // This function will call the server to get the requirement about DB, such as max size $dbChecks = $this->_getDbChecks($destionationBuild); @@ -508,14 +511,14 @@ public function backupDb($destionationBuild) $dbChecks->dbSize = Yii::app()->getConfig("maxdbsizeforbackup"); } - if( $dbChecks->result ) + if ($dbChecks->result ) { $currentDbVersion = Yii::app()->getConfig("dbversionnumber"); - if( $currentDbVersion < $dbChecks->dbVersion ) + if ($currentDbVersion < $dbChecks->dbVersion ) { $dbSize = $this->_getDbTotalSize(); - if( $dbSize <= $dbChecks->dbSize ) + if ($dbSize <= $dbChecks->dbSize ) { return $this->_createDbBackup(); } @@ -565,29 +568,33 @@ public function getUpdateNotification() $updates = $this->getUpdateInfo('1'); $update_available = FALSE; - if($updates->result) + if ($updates->result) { unset($updates->result); - if( count($updates) > 0) + if ( count($updates) > 0) { $update_available = TRUE; $security_update_available = FALSE; $unstable_update_available = FALSE; foreach( $updates as $update ) { - if($update->security_update) - $security_update_available = TRUE; - - if($update->branch != 'master') - $unstable_update_available = TRUE; + if ($update->security_update) + { + $security_update_available = TRUE; + } + + if ($update->branch != 'master') + { + $unstable_update_available = TRUE; + } } } Yii::app()->session['update_result'] = $update_available; Yii::app()->session['security_update'] = $security_update_available; // If only one update is available and it's an unstable one, then it will be displayed in a different color, and will be removed, not minified when clicked - if( count((array)$updates) == 1 && $unstable_update_available ) + if ( count((array)$updates) == 1 && $unstable_update_available ) Yii::app()->session['unstable_update'] = $unstable_update_available; else Yii::app()->session['unstable_update'] = false; @@ -667,7 +674,7 @@ private function _createDbBackup() $dfilename = $this->tempdir.DIRECTORY_SEPARATOR."LimeSurvey_database_backup_".$basefilename.".zip"; outputDatabase('',false,$sfilename); - if( is_file($sfilename) && filesize($sfilename)) + if ( is_file($sfilename) && filesize($sfilename)) { $archive = new PclZip($dfilename); $v_list = $archive->add(array($sfilename), PCLZIP_OPT_REMOVE_PATH, $this->tempdir,PCLZIP_OPT_ADD_TEMP_FILE_ON); @@ -721,7 +728,7 @@ private function _getReadOnlyCheckedFile($file) } } - if ( !$is_writable ) + if (!$is_writable ) { $checkedfile->type = 'readonlyfile'; $checkedfile->file = $searchpath; @@ -751,11 +758,11 @@ private function _getCheckedFile($file) $checkedfile->type = ''; $checkedfile->file = ''; - if($file['file']!='/application/config/version.php') + if ($file['file']!='/application/config/version.php') { // We check if the file exist - if ( $file['type'] == 'A' && file_exists($this->rootdir . $file['file']) ) + if ($file['type'] == 'A' && file_exists($this->rootdir . $file['file']) ) { //A new file, check if this already exists $checkedfile->type = 'existingfile'; @@ -763,7 +770,7 @@ private function _getCheckedFile($file) } // We check if the file has been modified - elseif(($file['type'] == 'D' || $file['type'] == 'M') && is_file($this->rootdir . $file['file']) && sha1_file($this->rootdir . $file['file']) != $file['checksum']) + elseif (($file['type'] == 'D' || $file['type'] == 'M') && is_file($this->rootdir . $file['file']) && sha1_file($this->rootdir . $file['file']) != $file['checksum']) { $checkedfile->type = 'modifiedfile'; $checkedfile->file = $file; @@ -809,15 +816,23 @@ private function _fileSystemCheck($obj) $check = new stdClass(); $check->name = $obj->name; - if($obj->writableCheck) + if ($obj->writableCheck) + { $check->writable = is_writable( $obj->name ); + } else + { $check->writable = 'pass'; + } - if($obj->freespaceCheck) + if ($obj->freespaceCheck) + { $check->freespace = (disk_free_space( $obj->name ) > $obj->minfreespace ); + } else + { $check->freespace = 'pass'; + } $check->name = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $check->name); @@ -833,7 +848,6 @@ private function _fileSystemCheckAppath($obj) { $obj->name = APPPATH . $obj->name; $check = $this->_fileSystemCheck($obj); - return $check; } @@ -847,7 +861,6 @@ private function _fileSystemCheckConfig($obj) { $obj->name = Yii::app()->getConfig($obj->name); $check = $this->_fileSystemCheck($obj); - return $check; } @@ -865,7 +878,7 @@ private function _phpVerCheck($build) $return = new stdClass(); $return->php_ver = $php_ver->php_version; - if(version_compare(PHP_VERSION, $return->php_ver) >= 0) + if (version_compare(PHP_VERSION, $return->php_ver) >= 0) { $return->result = TRUE; } @@ -874,7 +887,7 @@ private function _phpVerCheck($build) $return->result = FALSE; $return->local_php_ver = PHP_VERSION; } - return ( $return ); + return ($return); } /** @@ -889,7 +902,7 @@ private function _getModuleChecks($build) $php_module_list = $this->_performRequest($getters); $return = new stdClass(); - if($php_module_list->result) + if ($php_module_list->result) { foreach( $php_module_list->php_modules as $module => $state ) { @@ -910,7 +923,7 @@ private function _getMysqlChecks($build) { $checks = new stdClass(); $dbType = Yii::app()->db->getDriverName(); - if( in_array($dbType, array('mysql', 'mysqli')) ) + if (in_array($dbType, array('mysql', 'mysqli'))) { $checks->docheck = 'do'; $getters = '/index.php?r=updates/get-mysql-ver&build='.$build; @@ -934,9 +947,9 @@ private function _getMysqlChecks($build) private function _getProtocol() { $server_ssl = Yii::app()->getConfig("comfort_update_server_ssl"); - if( $server_ssl === 1 ) + if ($server_ssl === 1 ) { - if( extension_loaded("openssl") ) + if ( extension_loaded("openssl") ) { return 'https://'; } @@ -954,7 +967,6 @@ private function _getProtocol() private function _performDownload($getters, $fileName='update') { // TODO : Could test if curl is loaded, and if not, use httprequest2 - $ch = curl_init(); $pFile = fopen($this->tempdir.DIRECTORY_SEPARATOR.$fileName.'.zip', 'w'); curl_setopt($ch, CURLOPT_URL, $this->_getProtocol().Yii::app()->getConfig("comfort_update_server_url").$getters); @@ -968,10 +980,7 @@ private function _performDownload($getters, $fileName='update') $content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE); // But we want the header to be returned to the controller so we can check if a file has been returned curl_close($ch); - if($content_type == "application/zip") - $result = array("result"=>TRUE); - else - $result = array('result'=>FALSE, 'error'=>'error_while_processing_download'); + $result = ($content_type == "application/zip")?array("result"=>TRUE):array('result'=>FALSE, 'error'=>'error_while_processing_download'); return (object) $result; } @@ -985,23 +994,29 @@ private function _performDownload($getters, $fileName='update') private function _performRequest($getters, $CREATE_NEW_COOKIE_FILE=FALSE) { - if(( extension_loaded ("curl") )) + if (( extension_loaded ("curl") )) { - if( isset($_REQUEST['access_token']) ) + if ( isset($_REQUEST['access_token']) ) + { $getters .= "&access_token=".$_REQUEST['access_token']; + } $ch = curl_init($this->_getProtocol().Yii::app()->getConfig("comfort_update_server_url").$getters); - if($this->proxy_host_name != '') + if ($this->proxy_host_name != '') { $proxy = $this->proxy_host_name.':'.$this->proxy_host_port; curl_setopt($ch, CURLOPT_PROXY, $proxy); } - if($CREATE_NEW_COOKIE_FILE) + if ($CREATE_NEW_COOKIE_FILE) + { curl_setopt($ch, CURLOPT_COOKIEJAR, $this->path_cookie ); + } else + { curl_setopt($ch, CURLOPT_COOKIEFILE, $this->path_cookie ); + } curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); @@ -1009,7 +1024,7 @@ private function _performRequest($getters, $CREATE_NEW_COOKIE_FILE=FALSE) curl_close($ch); $content_decoded = json_decode ( base64_decode ( $content )); - if( ! is_object( $content_decoded )) + if (!is_object( $content_decoded )) { $content_decoded = new stdClass(); $content_decoded->result = FALSE; From 082b32e08b559f320e313df5ddab57051aa6ee55 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Tue, 1 Mar 2016 11:06:25 +0100 Subject: [PATCH 012/133] Dev: added link to services --- application/config/version.php | 2 +- application/controllers/admin/update.php | 10 +++---- .../update/updater/welcome/_subscribe.php | 5 +++- .../admin/comfortupdate/displayComfortStep.js | 27 +------------------ 4 files changed, 11 insertions(+), 33 deletions(-) diff --git a/application/config/version.php b/application/config/version.php index 4f73816493d..311636522a7 100644 --- a/application/config/version.php +++ b/application/config/version.php @@ -14,7 +14,7 @@ $config['versionnumber'] = "2.06lts"; $config['dbversionnumber'] = 184; -$config['buildnumber'] = 160229; +$config['buildnumber'] = ''; $config['updatable'] = true; return $config; ?> diff --git a/application/controllers/admin/update.php b/application/controllers/admin/update.php index 80d70ffe846..62f47ef525f 100755 --- a/application/controllers/admin/update.php +++ b/application/controllers/admin/update.php @@ -384,12 +384,12 @@ public function getnewkey() { if (Permission::model()->hasGlobalPermission('superadmin')) { - // We try to get the update key in the database. If it's empty, getWelcomeMessage will return subscription - $updateKey = NULL; + // We want to call the server to display the subscribe message + // So if needed, we can display a specific html message (like we do for update to LTS with a free key) + // To force server to render the subscribe message, we call for the last 2.06+ release (which need at least a free key) $updateModel = new UpdateForm(); - $destinationBuild = $_REQUEST['destinationBuild']; - $welcome = $updateModel->getWelcomeMessage($updateKey, $destinationBuild); //$updateKey - echo $this->_renderWelcome($welcome); + $welcome = $updateModel->getWelcomeMessage(null, '160129'); //$updateKey + echo $this->_renderWelcome($welcome); } } diff --git a/application/views/admin/update/updater/welcome/_subscribe.php b/application/views/admin/update/updater/welcome/_subscribe.php index 8431db951c3..e5b0f4c6d7a 100644 --- a/application/views/admin/update/updater/welcome/_subscribe.php +++ b/application/views/admin/update/updater/welcome/_subscribe.php @@ -11,10 +11,13 @@ echo $serverAnswer->html; ?> + alert_message) && $serverAnswer->alert_message=="subscribe_lts"):?> diff --git a/scripts/admin/comfortupdate/displayComfortStep.js b/scripts/admin/comfortupdate/displayComfortStep.js index 175ab0baa7e..dd7772b0ed7 100644 --- a/scripts/admin/comfortupdate/displayComfortStep.js +++ b/scripts/admin/comfortupdate/displayComfortStep.js @@ -52,35 +52,10 @@ $.fn.displayComfortStep = function(options) } - /* - $url += '?destinationBuild=' + $destinationBuild + '&access_token=' + $access_token; - $.ajax({ - - url: $url, - success: function(html) { - // We hide the loader, and we append the submit new key content - $ajaxLoader.hide(); - $("#updaterContainer").empty().append(html); - - // Menus - $("#welcome").hide(); - $("#newKey").show(); - - }, - error : function(html, statut){ - $("#preUpdaterContainer").empty(); - $("#updaterLayout").show(); - $("#updaterContainer").show(); - - $("#updaterContainer").empty().append("you have an error, or a notice, inside your local installation of limesurvey. See :
"); - $("#updaterContainer").append(html.responseText); - } - }); - */ - // Those datas are defined in _ajaxVariables view datas = 'destinationBuild=' + $destinationBuild + '&access_token=' + $access_token + '&'+csrf_token_name+'='+csrf_token; + $.ajax({ type: "POST", data: datas, From 562f2bc7915771261f555ba6e4991ba28be34797 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Tue, 1 Mar 2016 11:41:28 +0100 Subject: [PATCH 013/133] Release 2.06+LTS Build 160301 --- docs/release_notes.txt | 252 +++++++++++++++++++++-------------------- 1 file changed, 128 insertions(+), 124 deletions(-) diff --git a/docs/release_notes.txt b/docs/release_notes.txt index f10b1a1a750..61cd683bcb2 100644 --- a/docs/release_notes.txt +++ b/docs/release_notes.txt @@ -1,24 +1,24 @@ -Welcome to LimeSurvey v2.06+! - -Warranty: This program is provided "as is" without warranties of any kind, either expressed or implied, -including, but not limited to, the implied warranties of merchantability and fitness for a particular -purpose. The entire risk as to the quality and performance of the program is with you. -Should the program prove defective, you assume the cost of all necessary servicing, repair or correction. -In no event will any copyright holder be liable to you for damages, including any general, special, -incidental or consequential damages arising out of the use or inability to use the program -(including but not limited to loss of data or data being rendered inaccurate or losses sustained +Welcome to LimeSurvey v2.06+! + +Warranty: This program is provided "as is" without warranties of any kind, either expressed or implied, +including, but not limited to, the implied warranties of merchantability and fitness for a particular +purpose. The entire risk as to the quality and performance of the program is with you. +Should the program prove defective, you assume the cost of all necessary servicing, repair or correction. +In no event will any copyright holder be liable to you for damages, including any general, special, +incidental or consequential damages arising out of the use or inability to use the program +(including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs). HOW TO INSTALL --------------- -This release does have the following requirements: +This release does have the following requirements: *MySQL 4.1.0 or later OR Microsoft SQL Server 2005 or later OR Postgres 8.1 or later *PHP 5.3.3 or later with the following modules/libraries enabled: *mbstring (Multibyte String Functions) extension library (see also Installation FAQ(external link)) *PDO database driver for MySQL (pdo_mysql or pdo_mysqli) or Postgres (pdo_pgsql) or MSSQL (pdo_sqlsrv) - + If you are doing a complete new installation please refer to the manual at https://manual.limesurvey.org/Installation @@ -29,22 +29,22 @@ Please also have a look at the "Installation security hints" section of the onli We suggest to check out and hold close to the instructions, which can be found in our online manual: https://manual.limesurvey.org/Upgrading_from_a_previous_version - + HOW TO UPGRADE from earlier versions of LimeSurvey (<=1.08) ------------------------------------------------------------- -Since the data structure and a lot of other things were changed, upgrading from any version previous to v1.50 is NOT possible. -If you have old survey structure files with a *.sql extension the only way to get these into a newer version is to install version 1.50, import the .sql file(s) there, then upgrade that version to the most recent LimeSurvey version. +Since the data structure and a lot of other things were changed, upgrading from any version previous to v1.50 is NOT possible. +If you have old survey structure files with a *.sql extension the only way to get these into a newer version is to install version 1.50, import the .sql file(s) there, then upgrade that version to the most recent LimeSurvey version. HOW TO UPGRADE from LimeSurvey 1.50 or later (<=1.70) ------------------------------------------------------ 1. Make backups of your files and database. REALLY, create backups FIRST! -3. Delete all old files +3. Delete all old files 4. Upload the new version to the same place. 6. Run the installer by visiting http:////admin and follow the instructions -7. Restore any customized templates from your backup to /upload/templates (old version older than 1.70 either from /templates or from /upload/templates (>1.70)). You might have to adjust your templates since the CSS/structure might been changed since. - It is usually easier to customize a default templates, again, instead of fixing your old template! +7. Restore any customized templates from your backup to /upload/templates (old version older than 1.70 either from /templates or from /upload/templates (>1.70)). You might have to adjust your templates since the CSS/structure might been changed since. + It is usually easier to customize a default templates, again, instead of fixing your old template! 8. Done. TEMPLATE modification between LimeSurvey 1.8 @@ -58,11 +58,15 @@ Thank you to everyone who helped with this new release! CHANGE LOG ------------------------------------------------------ - + +Changes from 2.06LTS (build 160229) to 2.06LTS (build 160301) March 01, 2016 +Fixed issue: comfortUpdate, clean session and config as a last step ++New feature: added a link to limesurvey services on subscribe view. + Changes from 2.06+ (build 160123) to 2.06LTS (build 160229) Feb 29, 2016 Fixed issue: Error on update when using dblib database MSSQL driver (c_schmitz) -Fixed issue #10509: [Security] issue when saving/loading responses on public survey (c_schmitz) - +Fixed issue #10509: [Security] issue when saving/loading responses on public survey (c_schmitz) + Changes from 2.06+ (build 160123) to 2.06+ (build 160129) Jan 29, 2016 -Fixed issue #10233: Unable to add user to a group in a fresh install (Carsten Schmitz) -Fixed issue #10251: [security] Reflected XSS in admin (Thanks to Kacper Szurek - http://security.szurek.pl/ ) (Denis Chenu) @@ -79,7 +83,7 @@ Changes from 2.06+ (build 160123) to 2.06+ (build 160129) Jan 29, 2016 #Updated translation: Polish (Informal) by elisa #Updated translation: Swedish by maxzomborszki #Updated translation: Thai by tomzt - + Changes from 2.06+ (build 160121) to 2.06+ (build 160123) Jan 22, 2016 -Fixed issue: Question at the beginning of survey were skipped @@ -204,7 +208,7 @@ Changes from 2.06+ (build 151018) to 2.06+ (build 151109) Nov 9, 2015 #Updated translation: Polish (Informal) by elisa #Updated translation: Portuguese (Brazil) by valins, holch, mauriciofurtado #Updated translation: Portuguese (Portugal) by nostradumusfdx, sazevedo, valins, devUSIT, samarta -#Updated translation: Romanian +#Updated translation: Romanian #Updated translation: Slovenian #Updated translation: Spanish (Spain) #Updated translation: Swedish by bardts, maxzomborszki @@ -230,7 +234,7 @@ Changes from 2.06+ (build 150930) to 2.06+ (build 151014) Oct 14, 2015 -Fixed issue #9899: HTML editor launched even for email set to text (Denis Chenu) -Fixed issue #9926: Can't save dropdown values in CPD (kairavesloot) #Updated translation: Albanian by iebner -#Updated translation: Bulgarian +#Updated translation: Bulgarian #Updated translation: Catalan by qualitatuvic #Updated translation: Chinese (Taiwan) (Traditional) by linuslin, Alwaystar #Updated translation: Croatian @@ -468,7 +472,7 @@ Changes from 2.06+ (build 150629) to 2.06+ (build 150723) Jul 23, 2015 #Updated translation: Korean by spn #Updated translation: Polish by elisa #Updated translation: Polish (Informal) by elisa - + Changes from 2.06+ (build 150625) to 2.06+ (build 150629) Jun 29, 2015 -Fixed issue 09706: Wrong minimum PHP version in installer (Gabriele Mambrini) -Fixed issue #9589: Testing a survey for admin user can be broken (Denis Chenu) @@ -592,7 +596,7 @@ Changes from 2.05+ (build 131209) to 2.05+ (build 150520) May 20, 2015 -New feature #8596: Allow empty dates for RemoteControl add_response call (Nate Baker) -New feature: Add title on question list when exporting result (Denis Chenu) -New feature: Default value for yes/no question type (kairavesloot) --New translation: Kazakh +-New translation: Kazakh -New feature #9066: afterSurveyComplete aren't call from Quota : afterSurveyQuota (Denis Chenu) -New feature : use shortest url with urlFormat path (Denis Chenu) -New feature #8659: Configurable proxy for ComfortUpdate (mfaber) @@ -956,8 +960,8 @@ Changes from 1.92+ (build 120530) to 1.92+ (build 120607) June 7, 2012 -Fixed issue #6149: EM shows wrong result for number generated by rand() function (Thomas White) -Fixed issue #6154: File upload questions not mandatory anymore (Thomas White) -Fixed issue #6158: In question-by-question mode, EM replacements in same group but on different page use (Thomas White) --Fixed issue #6163: error in mandatory array_filter-ed multi-numeric and multiple-short questions --Fixed issue #6165: unable to implement affirmative exclusive non-answer in array_filter_exclude +-Fixed issue #6163: error in mandatory array_filter-ed multi-numeric and multiple-short questions +-Fixed issue #6165: unable to implement affirmative exclusive non-answer in array_filter_exclude -Fixed issue #06079: sub-question filtering broken if "other" or "no answer" option is given (Thomas White) -Fixed issue #6171: variable < X is true even if variable isn't answered (Thomas White) -Fixed issue #6172: Update to Version 1.92+ from 1.91+ Cannot Complete - Reason: Duplicate column name 'grelevance' (Thomas White) @@ -971,16 +975,16 @@ Changes from 1.92+ (build 120530) to 1.92+ (build 120607) June 7, 2012 -Fixed issue: mktime() function needs to be passed integer values (Thomas White) -Fixed issue: 'other' status flag missing from Show Logic File (Thomas White) -Fixed issue: Errors in Postgres upgrade and DB creation (Carsten Schmitz) -#Updated translation: Amharic by mezwor -#Updated translation: Czech by slansky -#Updated translation: Dutch +#Updated translation: Amharic by mezwor +#Updated translation: Czech by slansky +#Updated translation: Dutch #Updated translation: Dutch (Informal) -#Updated translation: Estonian by LimAlf -#Updated translation: Italian by lfanfoni +#Updated translation: Estonian by LimAlf +#Updated translation: Italian by lfanfoni #Updated translation: Polish by elisa -#Updated translation: Portuguese (Portugal) by algarvio -#Updated translation: Slovenian -#Updated translation: Spanish (Chile) by SirCrovax +#Updated translation: Portuguese (Portugal) by algarvio +#Updated translation: Slovenian +#Updated translation: Spanish (Chile) by SirCrovax #Updated translation: Turkish by kayazeren Changes from 1.92+ (build 120529) to 1.92+ (build 120530) May 28, 2012 @@ -993,11 +997,11 @@ Changes from 1.92+ (build 120526) to 1.92+ (build 120529) May 28, 2012 -Fixed issue: Admin language switching to survey language (Carsten Schmitz) Changes from 1.92+ (build 120517) to 1.92+ (build 120526) May 26, 2012 -#Updated translation: Dutch by Nickko +#Updated translation: Dutch by Nickko #Updated translation: Dutch (Informal) by Nickko (root) -#Updated translation: French by Denis Chenu, Nickko +#Updated translation: French by Denis Chenu, Nickko #Updated translation: German (Informal) by c_schmitz (root) -#Updated translation: German by c_schmitz +#Updated translation: German by c_schmitz #Updated translation: Polish (elisa-ls) #Updated translation: Dutch #Updated translation: Portuguese @@ -1006,7 +1010,7 @@ Changes from 1.92+ (build 120517) to 1.92+ (build 120526) May 26, 2012 -Fixed issue #5766: exclude_all_others_auto does not work (Thomas White) -Fixed issue #6114: Mail encryption really off for bounce managment (Denis Chenu) -Fixed issue #6119: Apostrophe bug in statistics PDF and Excel output (Carsten Schmitz) --Fixed issue #6124: User with limited rights is allowed to export complete MySQL DB +-Fixed issue #6124: User with limited rights is allowed to export complete MySQL DB -Fixed issue: User with configurator access doesn't have acces to global settings (Denis Chenu) -Fixed issue: Survey list does not show surveys having deleted owners (Carsten Schmitz) @@ -1017,10 +1021,10 @@ Changes from 1.92+ (build 120516) to 1.92+ (build 120517) May 17, 2012 Changes from 1.92+ (build 120509) to 1.92+ (build 120516) May 16, 2012 +New translation: Spanish (Chile) kindly provided by Victor Pinto (Carsten Schmitz) #Updated translation: Polish (elisa-ls) -#Updated translation: Amharic kindly provided by Mezene Worku +#Updated translation: Amharic kindly provided by Mezene Worku #Updated translation: Czech (lukas-slansky) -#Updated translation: German by c_schmitz -#Updated translation: Persian - kindly provided by Morteza Farahbod +#Updated translation: German by c_schmitz +#Updated translation: Persian - kindly provided by Morteza Farahbod #Updated translation: Turkish - 100% - kindly provided by Kaya Zeren -Fixed issue #5766: exclude_all_others_auto does not work (Thomas White) -Fixed issue #5943: Exclusive option in multiple choice hides all other answer options (Thomas White) @@ -1032,7 +1036,7 @@ Changes from 1.92+ (build 120509) to 1.92+ (build 120516) May 16, 2012 -Fixed issue #6093: Wrong result when comparing decimal values from equation question types in surveys using comma as decimal point (Thomas White) -Fixed issue #6102: "Print your answers" shows EM syntax errors (Thomas White) -Fixed issue #6048: Conditions editor produces fatal error: maximum allocated memory (Carsten Schmitz) --Fixed issue #6080: Wrong validation for multiple numeric questions +-Fixed issue #6080: Wrong validation for multiple numeric questions -Fixed issue #6085: By pasting a subquestion code can contain a space (Carsten Schmitz) -Fixed issue: Misaligned input with multi column on citronade (Denis Chenu) -Fixed issue: Array-filter equations not visible for List-type questions in Show Survey Logic file (Thomas White) @@ -1043,7 +1047,7 @@ Changes from 1.92+ (build 120509) to 1.92+ (build 120516) May 16, 2012 -Fixed issue: Unable to add label in label set administration (Carsten Schmitz) Changes from 1.92+ (build 120501) to 1.92+ (build 120509) May 9, 2012 -+New translation: Afrikaans ++New translation: Afrikaans +New translation: Amharic - kindly provided by Mezene Worku #Updated translation: Polish (elisa-ls) #Updated translation: German (Carsten Schmitz) @@ -1075,7 +1079,7 @@ Changes from 1.92+ (build 120425) to 1.92+ (build 120501) May 1, 2012 -Fixed issue #6045: Firefox 12 vertical scrolling problem in admin view (and other pages) (Carsten Schmitz) -Fixed issue #6056 - Quota languages don't update (jcleeland) -Fixed issue: Images inserted into HTML emails were not properly linked to the server (Carsten Schmitz) --Fixed issue: Fixed several HTML issues for data entry mode +-Fixed issue: Fixed several HTML issues for data entry mode -Fixed issue: Partial fix (just data entry - editing data missing) for bug #6044: Use advanced question settings such as numbers_only, display_rows, max_characters, prefix, suffix, ... at data entry screen. (Marcel Minke) Changes from 1.92+ (build 120418) to 1.92+ (build 120425) April 25, 2012 @@ -1107,9 +1111,9 @@ Changes from 1.92+ (build 120412) to 1.92+ (build 120418) April 18, 2012 -Fixed issue: Only set EM variables for {TOKEN:xxxx} when token table exists; and only for declared attributes (Thomas White) -Fixed issue: Participant IP address not correctly captured if server is behind proxy (Carsten Schmitz) -Fixed issue: Warning if upload file and there is no minimum number of files specified (Thomas White) -#Updated translation: Czech kindly provided by Slansky Lukas -#Updated translation: French kindly provided by Guillaume Jaouen -#Updated translation: German +#Updated translation: Czech kindly provided by Slansky Lukas +#Updated translation: French kindly provided by Guillaume Jaouen +#Updated translation: German #Updated translation: German (informal) (Carsten Schmitz) @@ -1199,7 +1203,7 @@ Changes from 1.91+ (build 120302) to 1.92+ (build 120311) Mar 11, 2012 -Fixed issue #5880: Make em_q_fn_validation and em_sq_fn_validation more easily visible (Thomas White) -Fixed issue #5887: Minimum answers in Ranking question type are deactivated (Thomas White) -Fixed issue #5892: With question type "Short free text" and "display row" set, the text field is shown with some code (Thomas White) --Fixed issue #5894: INSERTANS (and qcode.shown) returning wrong values for some question types +-Fixed issue #5894: INSERTANS (and qcode.shown) returning wrong values for some question types -Fixed issue #5895: On-page substitution of comment for List with Comment type not being displayed (Thomas White) -Fixed issue #5897: Survey ID not set correctly after row insert in servey_NNN table (Thomas White) -Fixed issue #5778: Multiple choice answer for rtl in basic,bluenegrey,citronade,clear_logo,eireicon Dev: Add some empty class in citronade (Shnoulle) @@ -1273,26 +1277,26 @@ Changes from 1.90 (build 9642) to 1.91+ (build 120302) Mar 3, 2012 +New feature: Welcome screen can be skipped by using a setting at survey level (mennodekker) +New feature #4588: Allow to reverse iteration order in Array (Numbers). This allows to reverse the iteration order of the generated numbers when setting "Minimum value" "Maximum value" and "Step" in "Array (Numbers)" question type. Reverse ordering can be achieved by putting a _max value lower than _min. The loop will iterate in reverse (you don't need to put a negative step value). Requested for questions where ordering could introduce bias. Patch by wavexx - Thank you! +New feature #4652: Keyboard-less operation through JS keypad for tablet PCs or other devices without keyboard - patch provided by Yuri D'Elia (wavexx) - thank you! -+New feature #4660: New switch in survey setting where you can enable that users may enter they survey even after completion and update their answers using the invitation link and token persistence - patch by room2web ++New feature #4660: New switch in survey setting where you can enable that users may enter they survey even after completion and update their answers using the invitation link and token persistence - patch by room2web +New feature #4650: Page color alternation and navigation delay (c_schmitz) +New feature: Quick navigation buttons to move forward and backward between question groups and questions (adevries) +New feature: Survey quick translation screen(adevries) +New feature: Ability to use comma or dot as decimal separator for numeric and multiple numeric question types - - work done by Google Code-In participant Kshitij Parajuli. Thank you! (c_schmitz) +New feature: Administration brute force detection and prevention - work done by Google Code-In participant Kshitij Parajuli. Thank you! -+New feature: Allow to restrict input to integers for Numeric question type - patch by wavexx -+New feature: Allow to reverse year order in dropdown dates - patch by wavexx ++New feature: Allow to restrict input to integers for Numeric question type - patch by wavexx ++New feature: Allow to reverse year order in dropdown dates - patch by wavexx +New feature: Changing owner of survey. (parajulik) +New feature: Detailed survey permissions based on a CRUD model (c_schmitz) +New feature: Direct export to queXML PDF file (azammitdcarf) +New feature: Emoticon slider (c_schmitz) -+New feature: Google Translate support for quick translation feature - work done by Google Code-In participant Kshitij Parajuli. Thank you! -+New feature: In "question by question" mode, you can now go "back" from the starting element of a group - patch by wavexx ++New feature: Google Translate support for quick translation feature - work done by Google Code-In participant Kshitij Parajuli. Thank you! ++New feature: In "question by question" mode, you can now go "back" from the starting element of a group - patch by wavexx +New feature: Login page automatically sets login language to browser language (c_schmitz) -+New feature: New option for "Number" question types named "Maximum value of the numeric input" and "Minimum value of the numeric input" - patch by wavexx ++New feature: New option for "Number" question types named "Maximum value of the numeric input" and "Minimum value of the numeric input" - patch by wavexx +New feature: Option in survey settings to hide the progress bar. (c_schmitz) +New feature: Optional question index to easily jump between questions while taking the survey. Index also shows if a part of a survey was completely answered or not - great work & patch done by Yuri D'Elia (wavexx) (c_schmitz) +New feature: Question attribute to reverse iteration order in Array (Numbers) question types - patch by wavexx (c_schmitz) -+New feature: Show details about LimeSurvey installation before starting the db upgrade - work done by Google Code-In participant Little Bird ++New feature: Show details about LimeSurvey installation before starting the db upgrade - work done by Google Code-In participant Little Bird +New feature: Support for the "maximum_chars" attribute to the array/numbers question type, when using the text input layout. (c_schmitz) +New feature: Spread sheet type row and colum totals for Array Multi text (numbers only) (eric_t_cruiser) +New feature: Switching SSL on and off (eric_t_cruiser) @@ -1309,7 +1313,7 @@ Changes from 1.90 (build 9642) to 1.91+ (build 120302) Mar 3, 2012 -Deleted feature: business_grey template (c_schmitz) -Changes from 1.87+ (build 8518) to 1.90+ (build 9561) Legend: # updated feature, - bug fix +Changes from 1.87+ (build 8518) to 1.90+ (build 9561) Legend: # updated feature, - bug fix +New feature: CSS class names for question/answer cells so you can better style the look and feel of the overview. (maziminke) +New feature: Very basic HTTPS support (c_schmitz) - allows dynamic switching between https and http +New feature: Irish Translation - kindly contributed by Karin Whooley, National Centre for Technology in Education, Dublin (c_schmitz) @@ -1359,7 +1363,7 @@ Changes from 1.87+ (build 8518) to 1.90+ (build 9561) Legend: # updated feature, #Updated translation: Bulgarian (c_schmitz) #Updated translation: German (c_schmitz) #Updated translation: Polish (elisa-ls) --Fixed issue #4028: PostgreSQL syntax errors while upgrading from 1.80 to 1.87 (gandalfar) +-Fixed issue #4028: PostgreSQL syntax errors while upgrading from 1.80 to 1.87 (gandalfar) -Fixed issue #4245: CSS class "questionhelp" used for two different elements (tpartner) -Fixed issue #4287: Long question text overlaps itself when editing question (tpartner) -Fixed issue #4302: Navigating between pages may change already saved answers (tpartner) @@ -1390,7 +1394,7 @@ Changes from 1.87+ (build 8518) to 1.90+ (build 9561) Legend: # updated feature, -Fixed issue: Wrong numbers were taken from DB to calculate the percentage of completed tokens at the list survey overview. (maziminke) -Changes from 1.87+ (build 8498) to 1.87+ (build 8518)- Legend: # updated feature, - bug fix +Changes from 1.87+ (build 8498) to 1.87+ (build 8518)- Legend: # updated feature, - bug fix #Updated feature: performance gain in both the participant and administrator interface by caching question attributes (saving loads of db queries) (mennodekker) #Updated translation: Croatian (idobraca) #Updated translation: French (b00z00) @@ -1404,7 +1408,7 @@ Changes from 1.87+ (build 8498) to 1.87+ (build 8518)- Legend: # updated featur -Fixed issue #4206:Array (Multi Flexible) (Numbers) - Not working correctly (harsha_mora) -Fixed unreported issue: When downloading R/SPSS export files in Opera they would be saved as *.html files (c_schmitz) -Changes from 1.87+ (build 8472) to 1.87+ (build 8498)- Legend: # updated feature, - bug fix +Changes from 1.87+ (build 8472) to 1.87+ (build 8498)- Legend: # updated feature, - bug fix #Updated translation: Catalan - sponsored by LimeService (c_schmitz) #Updated translation: Polish (elisa-ls) -Fixed issue #3303: "Error updating - Query was empty" when editing survey settings - again (c_schmitz) @@ -1417,7 +1421,7 @@ Changes from 1.87+ (build 8472) to 1.87+ (build 8498)- Legend: # updated featur -Fixed issue 04188: Edit Response - Data Entry - Not working Dev corrected filling values automatically for Array (MultiFlexible)(Numbers) type questions (harsha_mora) -Fixed the issue for Date type questions 04188 (harsha_mora) -Changes from 1.87+ (build 8453) to 1.87+ (build 8472)- Legend: # updated feature, - bug fix +Changes from 1.87+ (build 8453) to 1.87+ (build 8472)- Legend: # updated feature, - bug fix #Updated translation: French (b00z00) -Fixed unreported bug: Added help text relating to array_filter attributes, also added help text relating to multi-numerical sum value attributes (jcleeland) -Fixed issue #4165: Javascript is shown in group description (c_schmitz) @@ -1426,7 +1430,7 @@ Changes from 1.87+ (build 8453) to 1.87+ (build 8472)- Legend: # updated featur -Fixed issue #4183: Notices at Printable Survey if there are no answers/label set set for a question (c_schmitz) -Fixed issue #4174: applied survey defined date format to expiry date print out for Survey print view (eric_t_cruiser) -Changes from 1.87+ (build 8429) to 1.87+ (build 8453) - Legend: # updated feature, - bug fix +Changes from 1.87+ (build 8429) to 1.87+ (build 8453) - Legend: # updated feature, - bug fix #Updated feature: the html editor was updated from FCKeditor 2.6.5 to FCKeditor 2.6.6 (lemeur) #Updated translation: Chinese (Simpified), thanks to yooyooh from shanghai (gandalfar) #Updated translation: Croatian (idobraca) @@ -1443,7 +1447,7 @@ Changes from 1.87+ (build 8429) to 1.87+ (build 8453) - Legend: # updated featu -Fixed issue #4164: When using keyboard navigation the checkboxes are checked in Multiple options Question and Multiple options with comments question types (c_schmitz) -Fixed issue: Entering invalid float in multiple numeric question is causing the survey to exit (c_schmitz) -Changes from 1.87+ (build 6406) to 1.87+ (build 8429) - Legend: # updated feature, - bug fix +Changes from 1.87+ (build 6406) to 1.87+ (build 8429) - Legend: # updated feature, - bug fix +New language: Malay (thanks to Kardina Kamaruddin) (gandalfar) #Updated feature: Usability: In login and user language selection the select box is ordered now by the native language. In other language list boxes the native language won't be shown anymore. (c_schmitz) #Updated language: Croatian (idobraca) @@ -1461,7 +1465,7 @@ Changes from 1.87+ (build 6406) to 1.87+ (build 8429) - Legend: # updated featu -Fixed issue #4144: vvimport.php producing infinite loop (c_schmitz) -Fixed issue #4125: Text when quota reached in wrong language (idobraca) -Changes from 1.87+ (build 8374) to 1.87+ (build 8406) - Legend: # updated feature, - bug fix +Changes from 1.87+ (build 8374) to 1.87+ (build 8406) - Legend: # updated feature, - bug fix #Updated translation: Croatian (idobraca) #Updated translation: Slovenian (gandalfar) #Updated translation: Danish by Robin Sharp @@ -1489,14 +1493,14 @@ Changes from 1.87+ (build 8374) to 1.87+ (build 8406) - Legend: # updated featu -Fixed issue #4116: emailSender does not include full survey URL (wahrendorff) -Changes from 1.87+ (build 8366) to 1.87+ (build 8374) - Legend: # updated feature, - bug fix +Changes from 1.87+ (build 8366) to 1.87+ (build 8374) - Legend: # updated feature, - bug fix +New Feature: New option to compute stats for each question based only on the total number of responses for which the question was displayed. (lemeur) +New Feature: New option to generate statistics in any language supported by the survey. (lemeur) -Fixed a serious issue in save answer introduced in patch 8361 (lemeur) -Fixed unreported issue: Obsolete question_start.pstpl still editable in template editor even if it does not exist (c_schmitz) -Fixed unreported issue: Javascript error on some pages while typing in a other field for single choice question (lemeur) -Changes from 1.87+ (build 8338) to 1.87+ (build 8366) - Legend: # updated feature, - bug fix +Changes from 1.87+ (build 8338) to 1.87+ (build 8366) - Legend: # updated feature, - bug fix #Update of Croatian language file (idobraca) #Updated Feature #04097: small UI update, when clicking the conditions icon on the question toolbar, the condition editor is now open in edit mode, and not in view mode (lemeur) #Updated translation: German (c_schmitz) @@ -1512,7 +1516,7 @@ Changes from 1.87+ (build 8338) to 1.87+ (build 8366) - Legend: # updated featur -Fixed bug #4092: Quota name is shown as link but not clickable (maziminke) -Fixed bug #4090: notice when setting quotas (maziminke) -Changes from 1.87+ (build 8310) to 1.87+ (build 8338) - Legend: # updated feature, - bug fix +Changes from 1.87+ (build 8310) to 1.87+ (build 8338) - Legend: # updated feature, - bug fix #Updated translation: French (b00z00) #Updated translation: Greek by Penny Labropoulou (c_schmitz) -Fix issue 04051: Full screen HTML editor is not full screen (tpartner) @@ -1532,7 +1536,7 @@ Changes from 1.87+ (build 8310) to 1.87+ (build 8338) - Legend: # updated featur -Fixed unreported issue: subject of password remainder email wasn't translated (idobraca) -Changes from 1.87+ (build 8279) to 1.87+ (build 8310) - Legend: # updated feature, - bug fix +Changes from 1.87+ (build 8279) to 1.87+ (build 8310) - Legend: # updated feature, - bug fix #Updated translation: Croatian language (idobraca) #Updated translation: Slovenian translation (gandalfar) #Updated translation: German (c_schmitz) @@ -1547,11 +1551,11 @@ Changes from 1.87+ (build 8279) to 1.87+ (build 8310) - Legend: # updated featur -Fixed several HTML errors (mennodekker) -Changes from 1.87+ (build 8243) to 1.87+ (build 8279) - Legend: # updated feature, - bug fix +Changes from 1.87+ (build 8243) to 1.87+ (build 8279) - Legend: # updated feature, - bug fix +New feature: Added radio(list) to array_filter and array_filter_exclude (jcleeland) #Updated feature #4020: Show fullname and assigned rights in survey security settings overview (mennodekker) #Update translation: Croatian (idobraca) -#Updated translation: Finnish by Tapio Nurminen +#Updated translation: Finnish by Tapio Nurminen #Updated translation: German (c_schmitz) #Updated translation: German Informal (c_schmitz) #Updated translation: Norwegian bokmal by Pal Monstad ( @@ -1592,13 +1596,13 @@ Changes from 1.87 (build 8214) to 1.87+ (build 8227) - Legend: # updated feature Changes from 1.87RC5 (build 8151) [29-11-2009] to 1.87 (build 8214) - Legend: # updated feature, - bug fix #Updated translation: Croatian (idobraca) -#Updated translation: Chinese Traditional (Hong Kong) by Mark Yeung http://www.pstudy.net +#Updated translation: Chinese Traditional (Hong Kong) by Mark Yeung http://www.pstudy.net #Updated translation: French (b00z00) #Updated translation: German (c_schmitz) #Updated translation: German Informal (c_schmitz) -#Updated translation: Romanian by Stefaniu Criste +#Updated translation: Romanian by Stefaniu Criste #Updated translation: Spanish (es) (kadejo) -#Updated translation: Thai sponsored by LimeService +#Updated translation: Thai sponsored by LimeService #Updated translation: Polish (elisa-ls) -Fixed issue #4002: LimeReplacementfield window: no scrollbar or tooltips available (tpartner) -Fixed issue #4011: Notice after changing admin user rights for a survey is not centered (tpartner) @@ -1702,7 +1706,7 @@ Changes from 1.87RC4 (build 8002) [29-11-2009] to 1.87RC5 (build 8151) - Legend: Changes from 1.87RC3 (build 7996) to 1.87RC4 (build 8002) [29-11-2009] - Legend: # updated feature, - bug fix #Updated translation: French (b00z00) -#Updated translation: Portuguese Brazilian by Yoshitake +#Updated translation: Portuguese Brazilian by Yoshitake -Fixed issue #3913: Clean installation failing with error message "Error getting tokens" (c_schmitz) -Fixed issue: Json_decode error for PHP versions < 5.2 (c_schmitz) @@ -1713,13 +1717,13 @@ Changes from 1.87RC2 (build 7886) to 1.87RC3 (build 7996) [27-11-2009] - Legend: #Updated Feature: Token export now adds the attribute description in the header, next to the attribute_x fieldname (lemeur) #Updated translation: Croatian (idobraca) #Updated translation: French (b00z00) -#Updated translation: Dutch Informal by Han Velthuis -#Updated translation: Dutch by Han Velthuis -#Updated translation: Finnish by Tapio Nurminen +#Updated translation: Dutch Informal by Han Velthuis +#Updated translation: Dutch by Han Velthuis +#Updated translation: Finnish by Tapio Nurminen #Updated translation: German (c_schmitz) #Updated translation: German Informal (c_schmitz) -#Updated translation: Norwegian BokmÃ¥l. By Reidar Øksnevad -#Updated translation: Portuguese Brazilian by Yoshitake +#Updated translation: Norwegian BokmÃ¥l. By Reidar Øksnevad +#Updated translation: Portuguese Brazilian by Yoshitake #Updated translation: Slovakian by Pavel Cerny #Updated translation: Spanish (kadejo) #Updated translation: Galician(calidonia) @@ -1758,7 +1762,7 @@ Changes from 1.87RC1 (build 7886) to 1.87RC2 (build 7922) [18-11-2009] - Legend: +New feature - array_filter now works for multiple option questions (jcleeland) +New feature - array_filter_exclude - hides options based on answers to previous question. Works in opposite way to array_include (jcleeland) -Fixed issue #3483: the forgot password screen is limitted in username and email length making it impossible to retrieve passwords for users with very long email addresses (thanks to Taliesen) --Fixed issue #3852: Bug during update - wrong slash in update.php +-Fixed issue #3852: Bug during update - wrong slash in update.php -Fixed issue #3831: When adding HTML tag at text questions the survey crashes (c_schmitz) -Fixed issue #03840: Error when using time control (jcleeland) -Fixed issue #03841: Settings does not appear (timer text messages not appearing) - was more a bug with the entire textarea modification to the question attributes handling. Now solved. (jcleeland) @@ -1776,7 +1780,7 @@ Changes from 1.87RC1 (build 7886) to 1.87RC2 (build 7922) [18-11-2009] - Legend: Changes from 1.86 (build 7689) to 1.87RC1 (build 7886) [13-11-2009] - Legend: + new feature, # update feature, - bug fix +New feature #3292 and #2857: slider min and max can now be displayed below the slider (using the slider_showminmax question attribute). Slider Left and Right text can be displayed before and after the slider (using the slider_separator question attribute and using specific answers format). (lemeur) -+New feature: Reworked question attributes - they are shown as a form now and in fieldsets ++New feature: Reworked question attributes - they are shown as a form now and in fieldsets +New feature #3758: Possibility to define a favicon for a template (el-matador-69) +New feature: Reworked Saved responses and added table sorting capabilities (c_schmitz) +New feature: Token length can now be set for each survey (maziminke) @@ -1818,7 +1822,7 @@ Changes from 1.86 (build 7689) to 1.87RC1 (build 7886) [13-11-2009] - Legend: + -Fixed issue #3763: Double Tooltip at Condition Designer (lemeur) -Fixed issue #3785: No possibility to set other field as condition for 'List Flexible Labels Dropdown' and 'List Flexible Labels (Radio)' questions (lemeur) -Fixed issue #3818: Copy conditions function doesn't differentiate between upper and lower case. (lemeur) --Fixed issue #2713: SPSS export of data is in a strange order (mdekker) +-Fixed issue #2713: SPSS export of data is in a strange order (mdekker) -Fixed issue #3718: Question preview differs in design from survey at runtime (c_schmitz) -Fixed issue #3719: Little usability problem with automatic generated answer codes (c_schmitz) -Fixed issue #3720: Repeated answer header design being different to normal header in bluengrey and default template (c_schmitz) @@ -2567,8 +2571,8 @@ Fixed issues: -Fixed: same color for answertextright as for answertext (blue) (wahrendorff) -Fixed class.phpmailer.php like recommended in the forums, see http://www.limesurvey.org/index.php/fr/Development/20460-done-Bug-in-class.phpmailer.php.html (wahrendorff) - - + + Changes from 1.71 to 1.72 (build 5737) (2008/10/07) @@ -2776,12 +2780,12 @@ Changes from 1.70 to 1.71 (2008/06/02) New Features: -Standard sitename and sitemail when creating survey (lemeur) --Complete Korean translation submitted by Sehee Kim (cactusgrlkr -a-t- naver -dot-com) on behalf of the Korean Police School translation team. --Added basic support for Right-to-Left languages --Added Farsi translation stub by Laurent Giacobino +-Complete Korean translation submitted by Sehee Kim (cactusgrlkr -a-t- naver -dot-com) on behalf of the Korean Police School translation team. +-Added basic support for Right-to-Left languages +-Added Farsi translation stub by Laurent Giacobino -Added Welsh translation -Added Indonesian translation by Lukas (c_schmitz) --Numerous translation updates kindly provided by the project translators and users out there. +-Numerous translation updates kindly provided by the project translators and users out there. -Include new pdf-features (stfreud) -Reworked the SPSS export to a) remove redundant pass throughs of dataset (in DATA LIST build) @@ -2796,7 +2800,7 @@ Note, this was only tested with SPSS 15, it's likely there are UTF-8 problems. ( -Bug fixes: +Bug fixes: Lots of security fixes & Sanitizing the script (c_schmitz) Fixed #1807: Export to Excel on PHP4 creates empty .xls file. According warning message is shown in export window and export to excel to deactivated when iconv library in PHP4 is not installed. (c_schmitz) Fixed #1985: Exporting to SPSS shows 'SHOW COLUMNS ' error with non MySQL DB (awarren) @@ -2964,7 +2968,7 @@ New Features / Feature Changes - Release Date: 2008/02/25 [Survey at Runtime] Make Email Subjects of Admin Notifications Translateable (c_schmitz) [Survey Design] Move submit button to last question page (c_schmitz) [Survey at Runtime] Correct error message and further instructions, if user has disabled Cookies (c_schmitz) -[Security] Protection against token code brute force attacks (lemeur) +[Security] Protection against token code brute force attacks (lemeur) [Survey at Runtime] Checkbox for Multiple Choice Other Option (c_schmitz) [Survey Design] Mass Logic Eliminator (lemeur) [Survey Design] New conditions operators on comparizons,regexp (dgeaperez) @@ -3005,11 +3009,11 @@ Fixes: -The style of the "Ranking Question" is now adjusted to the new color scheme at DataEntry (c_schmitz) -Fixed notices in template editor at "Question Page", "Submit Page" and "Clear all page" (c_schmitz) -Fixed completed Date Field in token table being Too Short (c_schmitz) --Fixed Empty data on repeated submission in all-in-one mode (leochaton) --Fixed problem with mandatory questions in all-in-one mode (leochaton) --Fixed "Load unfinished survey" and "Save survey and return" buttons active even when the survey is not active (leochaton) +-Fixed Empty data on repeated submission in all-in-one mode (leochaton) +-Fixed problem with mandatory questions in all-in-one mode (leochaton) +-Fixed "Load unfinished survey" and "Save survey and return" buttons active even when the survey is not active (leochaton) -Fixed question marks being shown instead if Cyrillic/chinese/greek/... characters when installing LImeSurvey into a non-UTF8 database (c_schmitz) --Fixed $accesscontrol isn´t working correctly - removed this obsolete setting (leochaton, c_schmitz) +-Fixed $accesscontrol isn´t working correctly - removed this obsolete setting (leochaton, c_schmitz) -Fixed error clicking Browse button to view text box responses (leochaton) -Fixed Locale nl point to wrong images-directory (el-matador-69) -Fixed The saved control records were not deleted when the survey was deactivated. (leochaton) @@ -3057,7 +3061,7 @@ New General Features * Fixed image links and included PNGFix in admin interface for crappy old IE6 browsers (nkorfiatis) * Bubble hints on icons for FF (nkorfiatis) * DB Versioning for easier updates to the DB in the future (c_schmitz)) - * Removed experimental interface + * Removed experimental interface New Languages @@ -3070,13 +3074,13 @@ New Languages * Polish by Maciej Zawado * Serbian by Ivan Recevic * Spanish by Carlos Juan Martín Pérez - * Vietnamese by Vinh Ngo + * Vietnamese by Vinh Ngo New Templates * New default template - * New clear_logo template + * New clear_logo template @@ -3157,12 +3161,12 @@ New features: Added croatian language file (submitted by Ivana Pavic)! Change survey sent/taken from "Y" to the date: - When reviewing the tokens display, the fields telling if the survey request was sent, - and the survey taken, display a N or Y. This was changed to be the actual date this event took place. - This is giving some siginificant additional information to the survey author. (Patch by Thomas Ringate / tringate!) -New global option that allows the administrator to specify what is the minimum number of remaining answers - in an 'array - flexible' question that must be remaining before repeating the question headings. This - avoids that the headings of the question are repeated if only a few answers are remaining. (Patch by Kris Ven !) + When reviewing the tokens display, the fields telling if the survey request was sent, + and the survey taken, display a N or Y. This was changed to be the actual date this event took place. + This is giving some siginificant additional information to the survey author. (Patch by Thomas Ringate / tringate!) +New global option that allows the administrator to specify what is the minimum number of remaining answers + in an 'array - flexible' question that must be remaining before repeating the question headings. This + avoids that the headings of the question are repeated if only a few answers are remaining. (Patch by Kris Ven !) Changes: Moved admin CSS styles to separate CSS file @@ -3199,23 +3203,23 @@ Changes from 0.98 to 0.99 1.) New question types -* List type question divided into two question types - radio -button or drop down, so you can choose on a question by -question basis whether or not to have radio buttons or a +* List type question divided into two question types - radio +button or drop down, so you can choose on a question by +question basis whether or not to have radio buttons or a dropdown list. -* New "flexible" list type question uses labelsets to make reusing +* New "flexible" list type question uses labelsets to make reusing sets of answers easier - one radio and one dropdown type * New "Huge" text question allows for a _really big_ textarea 2.) New features -* UTF-8 conversion. Use any char of any language mixed together. - The problems with mixed up charsets are gone now hopefully. +* UTF-8 conversion. Use any char of any language mixed together. + The problems with mixed up charsets are gone now hopefully. READ THE STATEMENT AT THE BEGINNING OF THIS FILE!!!! -* Question attributes, allows for better control over the display +* Question attributes, allows for better control over the display and working of individual questions - for example: - Have multiple choice or list questions display in multiple columns @@ -3229,8 +3233,8 @@ and working of individual questions - for example: * New system option to set the table type in MySQL -* New "assessments" feature which allows you to sum the -answers to groups of questions, or the total survey, and then +* New "assessments" feature which allows you to sum the +answers to groups of questions, or the total survey, and then present an "assessment" when the users submits the survey. * New survey options, including: @@ -3240,11 +3244,11 @@ present an "assessment" when the users submits the survey. - Automatically load the "URL" when the user has completed the survey * VV Import and VV Export - - A way of exporting and importing results directly to the responses table - which not only allows merging of survey - responses run on different servers, but also the ability to add or remove questions to a survey while preserving the existing + - A way of exporting and importing results directly to the responses table - which not only allows merging of survey + responses run on different servers, but also the ability to add or remove questions to a survey while preserving the existing responses. -* New sample survey +* New sample survey * Added W3C HTML 4.01 transitional and WAI 508 compliance (not yet finished) @@ -3253,9 +3257,9 @@ present an "assessment" when the users submits the survey. 3.) New language translations -* COMPLETE French translation of the instructions and updated french language file +* COMPLETE French translation of the instructions and updated french language file kindly provided by S bastien GAUGRY !! (great work!) -* COMPLETE Italian translation of the instructions and +* COMPLETE Italian translation of the instructions and updated italian language file kindly provided by Mario Marani !! (great work!) * Bulgarian Language File kindly provided by Nikolay Tsanov * Added Portuguese language kindly provided by Rosaura Gazzola & Job Vieira L cio, Brazil @@ -3264,12 +3268,12 @@ present an "assessment" when the users submits the survey. 4.) New themes -* Included "Blue Heaven" theme -* Included "BluenGrey" theme -* Included "Vallendar" theme -* Included "Business_Grey" theme -* Included "Eirenicon" theme -* Included "SoftGreenCurves" theme +* Included "Blue Heaven" theme +* Included "BluenGrey" theme +* Included "Vallendar" theme +* Included "Business_Grey" theme +* Included "Eirenicon" theme +* Included "SoftGreenCurves" theme -... and tons of bugfixes - too many to write down here... \ No newline at end of file +... and tons of bugfixes - too many to write down here... From cefdcd1ffd75cb0de1491de1e852ee9712173b5a Mon Sep 17 00:00:00 2001 From: LouisGac Date: Tue, 1 Mar 2016 19:08:24 +0100 Subject: [PATCH 014/133] Dev: destroy security alert after update --- application/controllers/admin/update.php | 7 ++++++- application/models/UpdateForm.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/application/controllers/admin/update.php b/application/controllers/admin/update.php index 62f47ef525f..1d9cd51a45e 100755 --- a/application/controllers/admin/update.php +++ b/application/controllers/admin/update.php @@ -353,7 +353,12 @@ public function updateUpdater() if ($unzip->result ) { $updateModel->removeTmpFile('update_updater.zip'); - $updateModel->removeTmpFile('comfort_updater_cookie.txt'); + $updateModel->removeTmpFile('comfort_updater_cookie.txt'); + setGlobalSetting('updateavailable','0'); + setGlobalSetting('updatebuild',''); + setGlobalSetting('updateversions',''); + Yii::app()->session['update_result']=null; + Yii::app()->session['next_update_check']=null; return $this->controller->renderPartial('update/updater/steps/_updater_updated', array('destinationBuild'=>$destinationBuild), false, false); } else diff --git a/application/models/UpdateForm.php b/application/models/UpdateForm.php index 5cff8d98645..417a23470b1 100644 --- a/application/models/UpdateForm.php +++ b/application/models/UpdateForm.php @@ -394,6 +394,7 @@ public function destroyGlobalSettings() setGlobalSetting('updateavailable','0'); setGlobalSetting('updatebuild',''); setGlobalSetting('updateversions',''); + Yii::app()->session['security_update']=null; Yii::app()->session['update_result']=null; Yii::app()->session['next_update_check']=null; } @@ -555,7 +556,6 @@ public function backupDb($destionationBuild) */ public function getUpdateNotification() { - if (Yii::app()->getConfig("updatable")) { $today = new DateTime("now"); From 1b748ff7fa8368e8b5fadd32f8d61de4868e0ac8 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Tue, 1 Mar 2016 19:17:59 +0100 Subject: [PATCH 015/133] Dev: force updater version reset after updater update --- application/controllers/admin/update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/admin/update.php b/application/controllers/admin/update.php index 1d9cd51a45e..d6a3ad05ac7 100755 --- a/application/controllers/admin/update.php +++ b/application/controllers/admin/update.php @@ -353,10 +353,10 @@ public function updateUpdater() if ($unzip->result ) { $updateModel->removeTmpFile('update_updater.zip'); - $updateModel->removeTmpFile('comfort_updater_cookie.txt'); + $updateModel->removeTmpFile('comfort_updater_cookie.txt'); setGlobalSetting('updateavailable','0'); setGlobalSetting('updatebuild',''); - setGlobalSetting('updateversions',''); + setGlobalSetting('updaterversions',''); Yii::app()->session['update_result']=null; Yii::app()->session['next_update_check']=null; return $this->controller->renderPartial('update/updater/steps/_updater_updated', array('destinationBuild'=>$destinationBuild), false, false); From 2aed6cbf25eaa0ed282aa526ee2d3f2cb1dd1468 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Tue, 1 Mar 2016 19:33:26 +0100 Subject: [PATCH 016/133] Release 2.06+LTS Build 160302 --- docs/release_notes.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/release_notes.txt b/docs/release_notes.txt index 61cd683bcb2..52752199896 100644 --- a/docs/release_notes.txt +++ b/docs/release_notes.txt @@ -59,6 +59,10 @@ Thank you to everyone who helped with this new release! CHANGE LOG ------------------------------------------------------ +Changes from 2.06LTS (build 160301) to 2.06LTS (build 160302) March 01, 2016 +Fixed issue: destroy security alert after update. +Fixed issue: force updater version reset after updater update. + Changes from 2.06LTS (build 160229) to 2.06LTS (build 160301) March 01, 2016 Fixed issue: comfortUpdate, clean session and config as a last step +New feature: added a link to limesurvey services on subscribe view. From 065f2eb239442b6a9e4bc86a948ce522b10c4e1a Mon Sep 17 00:00:00 2001 From: LouisGac Date: Tue, 1 Mar 2016 20:07:13 +0100 Subject: [PATCH 017/133] Dev: force page reload after update to take in account the new session variables --- .../views/admin/update/updater/steps/_final.php | 17 ++++++++--------- .../update/updater/steps/_updater_updated.php | 6 +++--- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/application/views/admin/update/updater/steps/_final.php b/application/views/admin/update/updater/steps/_final.php index b211d6c6497..d26ba5c6de3 100644 --- a/application/views/admin/update/updater/steps/_final.php +++ b/application/views/admin/update/updater/steps/_final.php @@ -9,22 +9,21 @@
session['updateinfo']['toversion']).'
'; - eT('The update is now complete!'); - ?> + eT('The update is now complete!'); + ?>
-
- -
+
+ +
- " role="button" aria-disabled="false"> + " role="button" aria-disabled="false"> - +
- diff --git a/application/views/admin/update/updater/steps/_updater_updated.php b/application/views/admin/update/updater/steps/_updater_updated.php index c5dd0dba142..4bd973c8a17 100644 --- a/application/views/admin/update/updater/steps/_updater_updated.php +++ b/application/views/admin/update/updater/steps/_updater_updated.php @@ -12,11 +12,11 @@

- +

- + - + From 36990525ff7e14a7f25a28284ff489e34d1a1049 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Tue, 1 Mar 2016 20:26:00 +0100 Subject: [PATCH 018/133] Release 2.06+LTS Build 160303 --- docs/release_notes.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/release_notes.txt b/docs/release_notes.txt index 52752199896..d9309f366ab 100644 --- a/docs/release_notes.txt +++ b/docs/release_notes.txt @@ -59,6 +59,10 @@ Thank you to everyone who helped with this new release! CHANGE LOG ------------------------------------------------------ +Changes from 2.06LTS (build 160302) to 2.06LTS (build 160303) March 01, 2016 +Fixed issue: force page reload after comfortUpdate. +Fixed issue: force page reload after update of updater. + Changes from 2.06LTS (build 160301) to 2.06LTS (build 160302) March 01, 2016 Fixed issue: destroy security alert after update. Fixed issue: force updater version reset after updater update. From 8614e7ac04d786f35f5cf43979a5111aef964086 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Wed, 2 Mar 2016 16:13:40 +0100 Subject: [PATCH 019/133] Dev: force logout after update (present in updater-7.zip) --- application/views/admin/update/updater/steps/_final.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/views/admin/update/updater/steps/_final.php b/application/views/admin/update/updater/steps/_final.php index d26ba5c6de3..98847d2ff4f 100644 --- a/application/views/admin/update/updater/steps/_final.php +++ b/application/views/admin/update/updater/steps/_final.php @@ -19,9 +19,9 @@
- " role="button" aria-disabled="false"> - - + " role="button" aria-disabled="false"> + + \ No newline at end of file + diff --git a/application/views/admin/update/updater/steps/textaeras/_existingfiles.php b/application/views/admin/update/updater/steps/textaeras/_existingfiles.php index 23792eb0355..623b7898164 100644 --- a/application/views/admin/update/updater/steps/textaeras/_existingfiles.php +++ b/application/views/admin/update/updater/steps/textaeras/_existingfiles.php @@ -9,6 +9,7 @@ ?> 0): ?> +


@@ -22,4 +23,4 @@ } ?> - \ No newline at end of file + diff --git a/application/views/admin/update/updater/steps/textaeras/_modifiedfiles.php b/application/views/admin/update/updater/steps/textaeras/_modifiedfiles.php index 453f884f898..75721eb53d4 100644 --- a/application/views/admin/update/updater/steps/textaeras/_modifiedfiles.php +++ b/application/views/admin/update/updater/steps/textaeras/_modifiedfiles.php @@ -10,6 +10,7 @@ 0): ?>

+


diff --git a/application/views/admin/update/updater/steps/textaeras/_readonlyfiles.php b/application/views/admin/update/updater/steps/textaeras/_readonlyfiles.php index f37ceb7060f..f4664376cc3 100644 --- a/application/views/admin/update/updater/steps/textaeras/_readonlyfiles.php +++ b/application/views/admin/update/updater/steps/textaeras/_readonlyfiles.php @@ -4,17 +4,15 @@ * If no readonly file, display a success message * * @var array $readonlyfiles array continaing the readonly files. - * @var obj clang */ ?> 0):?> - +

- ",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/

\s*$/g,sb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"
","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:l.htmlSerialize?[0,"",""]:[1,"X
","
"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?""!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("').prependTo(document.body); + $('#loading').html(_.label("Uploading file...")).show(); + form.submit(); + $('#uploadResponse').load(function() { + var response = $(this).contents().find('body').text(); + $('#loading').hide(); + response = response.split("\n"); + + var selected = [], errors = []; + $.each(response, function(i, row) { + if (row.substr(0, 1) == "/") + selected[selected.length] = row.substr(1, row.length - 1); + else + errors[errors.length] = row; + }); + if (errors.length) { + errors = errors.join("\n"); + if (errors.replace(/^\s+/g, "").replace(/\s+$/g, "").length) + _.alert(errors); + } + if (!selected.length) + selected = null; + _.refresh(selected); + $('#upload').detach(); + setTimeout(function() { + $('#uploadResponse').detach(); + }, 1); + _.initUploadButton(); + }); +}; + +_.maximize = function(button) { + + // TINYMCE 3 + if (_.opener.name == "tinymce") { + + var par = window.parent.document, + ifr = $('iframe[src*="browse.php?opener=tinymce&"]', par), + id = parseInt(ifr.attr('id').replace(/^mce_(\d+)_ifr$/, "$1")), + win = $('#mce_' + id, par); + + if ($(button).hasClass('selected')) { + $(button).removeClass('selected'); + win.css({ + left: _.maximizeMCE.left, + top: _.maximizeMCE.top, + width: _.maximizeMCE.width, + height: _.maximizeMCE.height + }); + ifr.css({ + width: _.maximizeMCE.width - _.maximizeMCE.Hspace, + height: _.maximizeMCE.height - _.maximizeMCE.Vspace + }); + + } else { + $(button).addClass('selected') + _.maximizeMCE = { + width: parseInt(win.css('width')), + height: parseInt(win.css('height')), + left: win.position().left, + top: win.position().top, + Hspace: parseInt(win.css('width')) - parseInt(ifr.css('width')), + Vspace: parseInt(win.css('height')) - parseInt(ifr.css('height')) + }; + var width = $(window.top).width(), + height = $(window.top).height(); + win.css({ + left: $(window.parent).scrollLeft(), + top: $(window.parent).scrollTop(), + width: width, + height: height + }); + ifr.css({ + width: width - _.maximizeMCE.Hspace, + height: height - _.maximizeMCE.Vspace + }); + } + + // TINYMCE 4 + } else if (_.opener.name == "tinymce4") { + + var par = window.parent.document, + ifr = $('iframe[src*="browse.php?opener=tinymce4&"]', par).parent(), + win = ifr.parent(); + + if ($(button).hasClass('selected')) { + $(button).removeClass('selected'); + + win.css({ + left: _.maximizeMCE4.left, + top: _.maximizeMCE4.top, + width: _.maximizeMCE4.width, + height: _.maximizeMCE4.height + }); + + ifr.css({ + width: _.maximizeMCE4.width, + height: _.maximizeMCE4.height - _.maximizeMCE4.Vspace + }); + + } else { + $(button).addClass('selected'); + + _.maximizeMCE4 = { + width: parseInt(win.css('width')), + height: parseInt(win.css('height')), + left: win.position().left, + top: win.position().top, + Vspace: win.outerHeight(true) - ifr.outerHeight(true) - 1 + }; + + var width = $(window.top).width(), + height = $(window.top).height(); + + win.css({ + left: 0, + top: 0, + width: width, + height: height + }); + + ifr.css({ + width: width, + height: height - _.maximizeMCE4.Vspace + }); + } + + // PUPUP WINDOW + } else if (window.opener) { + window.moveTo(0, 0); + width = screen.availWidth; + height = screen.availHeight; + if ($.agent.opera) + height -= 50; + window.resizeTo(width, height); + + } else { + if (window.parent) { + var el = null; + $(window.parent.document).find('iframe').each(function() { + if (this.src.replace('/?', '?') == window.location.href.replace('/?', '?')) { + el = this; + return false; + } + }); + + // IFRAME + if (el !== null) + $(el).toggleFullscreen(window.parent.document); + + // SELF WINDOW + else + $('body').toggleFullscreen(); + + } else + $('body').toggleFullscreen(); + } +}; + +_.refresh = function(selected) { + _.fadeFiles(); + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("chDir"), + data: {dir: _.dir}, + async: false, + success: function(data) { + if (_.check4errors(data)) { + $('#files > div').css({opacity: "", filter: ""}); + return; + } + _.dirWritable = data.dirWritable; + _.files = data.files ? data.files : []; + _.orderFiles(null, selected); + _.statusDir(); + }, + error: function() { + $('#files > div').css({opacity: "", filter: ""}); + $('#files').html(_.label("Unknown error.")); + } + }); +}; +/** This file is part of KCFinder project + * + * @desc Settings panel functionality + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.initSettings = function() { + $('#settings').disableTextSelect(); + $('#settings fieldset, #settings input, #settings label').uniform(); + + if (!_.shows.length) + $('#show input[type="checkbox"]').each(function(i) { + _.shows[i] = this.name; + }); + + var shows = _.shows; + + if (!$.$.kuki.isSet('showname')) { + $.$.kuki.set('showname', "on"); + $.each(shows, function (i, val) { + if (val != "name") $.$.kuki.set('show' + val, "off"); + }); + } + + $('#show input[type="checkbox"]').click(function() { + $.$.kuki.set('show' + this.name, this.checked ? "on" : "off") + $('#files .file div.' + this.name).css('display', this.checked ? "block" : "none"); + }); + + $.each(shows, function(i, val) { + $('#show input[name="' + val + '"]').get(0).checked = ($.$.kuki.get('show' + val) == "on") ? "checked" : ""; + }); + + if (!_.orders.length) + $('#order input[type="radio"]').each(function(i) { + _.orders[i] = this.value; + }) + + var orders = _.orders; + + if (!$.$.kuki.isSet('order')) + $.$.kuki.set('order', "name"); + + if (!$.$.kuki.isSet('orderDesc')) + $.$.kuki.set('orderDesc', "off"); + + $('#order input[value="' + $.$.kuki.get('order') + '"]').get(0).checked = true; + $('#order input[name="desc"]').get(0).checked = ($.$.kuki.get('orderDesc') == "on"); + + $('#order input[type="radio"]').click(function() { + $.$.kuki.set('order', this.value); + _.orderFiles(); + }); + + $('#order input[name="desc"]').click(function() { + $.$.kuki.set('orderDesc', this.checked ? 'on' : "off"); + _.orderFiles(); + }); + + if (!$.$.kuki.isSet('view')) + $.$.kuki.set('view', "thumbs"); + + if ($.$.kuki.get('view') == "list") + $('#show').parent().hide(); + + $('#view input[value="' + $.$.kuki.get('view') + '"]').get(0).checked = true; + + $('#view input').click(function() { + var view = this.value; + if ($.$.kuki.get('view') != view) { + $.$.kuki.set('view', view); + if (view == "list") + $('#show').parent().hide(); + else + $('#show').parent().show(); + } + _.fixFilesHeight(); + _.refresh(); + }); +}; +/** This file is part of KCFinder project + * + * @desc File related functionality + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.initFiles = function() { + $(document).unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); + $('#files').unbind().scroll(function() { + _.menu.hide(); + }).disableTextSelect(); + + $('.file').unbind().click(function(e) { + _.selectFile($(this), e); + + }).rightClick(function(el, e) { + _.menuFile($(el), e); + }).dblclick(function() { + _.returnFile($(this)); + }); + + if ($.mobile) + $('.file').on('taphold', function() { + _.menuFile($(this), { + pageX: $(this).offset().left, + pageY: $(this).offset().top + $(this).outerHeight() + }); + }); + + $.each(_.shows, function(i, val) { + $('#files .file div.' + val).css('display', ($.$.kuki.get('show' + val) == "off") ? "none" : "block"); + }); + _.statusDir(); +}; + +_.showFiles = function(callBack, selected) { + _.fadeFiles(); + setTimeout(function() { + var c = $('
'); + + $.each(_.files, function(i, file) { + var f, icon, + stamp = file.size + "|" + file.mtime; + + // List + if ($.$.kuki.get('view') == "list") { + if (!i) c.html('
'); + + icon = $.$.getFileExtension(file.name); + if (file.thumb) + icon = ".image"; + else if (!icon.length || !file.smallIcon) + icon = "."; + icon = "themes/" + _.theme + "/img/files/small/" + icon + ".png"; + + f = $(''); + f.appendTo(c.find('table')); + + // Thumbnails + } else { + if (file.thumb) + icon = _.getURL('thumb') + "&file=" + encodeURIComponent(file.name) + "&dir=" + encodeURIComponent(_.dir) + "&stamp=" + stamp; + else if (file.smallThumb) { + icon = _.uploadURL + "/" + _.dir + "/" + encodeURIComponent(file.name); + icon = $.$.escapeDirs(icon).replace(/\'/g, "%27"); + } else { + icon = file.bigIcon ? $.$.getFileExtension(file.name) : "."; + if (!icon.length) icon = "."; + icon = "themes/" + _.theme + "/img/files/big/" + icon + ".png"; + } + f = $('
'); + f.appendTo(c); + } + + f.find('.thumb').css({backgroundImage: 'url("' + icon + '")'}); + f.find('.name').html($.$.htmlData(file.name)); + f.find('.time').html(file.date); + f.find('.size').html(_.humanSize(file.size)); + f.data(file); + + if ((file.name === selected) || $.$.inArray(file.name, selected)) + f.addClass('selected'); + }); + + c.css({opacity:'', filter:''}); + $('#files').html(c); + + if (callBack) callBack(); + _.initFiles(); + }, 200); +}; + +_.selectFile = function(file, e) { + + // Click with Ctrl, Meta or Shift key + if (e.ctrlKey || e.metaKey || e.shiftKey) { + + // Click with Shift key + if (e.shiftKey && !file.hasClass('selected')) { + var f = file.prev(); + while (f.get(0) && !f.hasClass('selected')) { + f.addClass('selected'); + f = f.prev(); + } + } + + file.toggleClass('selected'); + + // Update statusbar + var files = $('.file.selected').get(), + size = 0, data; + if (!files.length) + _.statusDir(); + else { + $.each(files, function(i, cfile) { + size += $(cfile).data('size'); + }); + size = _.humanSize(size); + if (files.length > 1) + $('#fileinfo').html(files.length + " " + _.label("selected files") + " (" + size + ")"); + else { + data = $(files[0]).data(); + $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); + } + } + + // Normal click + } else { + data = file.data(); + $('.file').removeClass('selected'); + file.addClass('selected'); + $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); + } +}; + +_.selectAll = function(e) { + if ((!e.ctrlKey && !e.metaKey) || ((e.keyCode != 65) && (e.keyCode != 97))) // Ctrl-A + return false; + + var files = $('.file'), + size = 0; + + if (files.length) { + + files.addClass('selected').each(function() { + size += $(this).data('size'); + }); + + $('#fileinfo').html(files.length + " " + _.label("selected files") + " (" + _.humanSize(size) + ")"); + } + + return true; +}; + +_.returnFile = function(file) { + + var button, win, fileURL = file.substr + ? file : _.uploadURL + "/" + _.dir + "/" + file.data('name'); + fileURL = $.$.escapeDirs(fileURL); + + if (_.opener.name == "ckeditor") { + _.opener.CKEditor.object.tools.callFunction(_.opener.CKEditor.funcNum, fileURL, ""); + window.close(); + + } else if (_.opener.name == "fckeditor") { + window.opener.SetUrl(fileURL) ; + window.close() ; + + } else if (_.opener.name == "tinymce") { + win = tinyMCEPopup.getWindowArg('window'); + win.document.getElementById(tinyMCEPopup.getWindowArg('input')).value = fileURL; + if (win.getImageData) win.getImageData(); + if (typeof(win.ImageDialog) != "undefined") { + if (win.ImageDialog.getImageData) + win.ImageDialog.getImageData(); + if (win.ImageDialog.showPreviewImage) + win.ImageDialog.showPreviewImage(fileURL); + } + tinyMCEPopup.close(); + + } else if (_.opener.name == "tinymce4") { + win = (window.opener ? window.opener : window.parent); + $(win.document).find('#' + _.opener.TinyMCE.field).val(fileURL); + win.tinyMCE.activeEditor.windowManager.close(); + + } else if (_.opener.callBack) { + + if (window.opener && window.opener.KCFinder) { + _.opener.callBack(fileURL); + window.close(); + } + + if (window.parent && window.parent.KCFinder) { + button = $('#toolbar a[href="kcact:maximize"]'); + if (button.hasClass('selected')) + _.maximize(button); + _.opener.callBack(fileURL); + } + + } else if (_.opener.callBackMultiple) { + if (window.opener && window.opener.KCFinder) { + _.opener.callBackMultiple([fileURL]); + window.close(); + } + + if (window.parent && window.parent.KCFinder) { + button = $('#toolbar a[href="kcact:maximize"]'); + if (button.hasClass('selected')) + _.maximize(button); + _.opener.callBackMultiple([fileURL]); + } + + } +}; + +_.returnFiles = function(files) { + if (_.opener.callBackMultiple && files.length) { + var rfiles = []; + $.each(files, function(i, file) { + rfiles[i] = _.uploadURL + "/" + _.dir + "/" + $(file).data('name'); + rfiles[i] = $.$.escapeDirs(rfiles[i]); + }); + _.opener.callBackMultiple(rfiles); + if (window.opener) window.close() + } +}; + +_.returnThumbnails = function(files) { + if (_.opener.callBackMultiple) { + var rfiles = [], j = 0; + $.each(files, function(i, file) { + if ($(file).data('thumb')) { + rfiles[j] = _.thumbsURL + "/" + _.dir + "/" + $(file).data('name'); + rfiles[j] = $.$.escapeDirs(rfiles[j++]); + } + }); + _.opener.callBackMultiple(rfiles); + if (window.opener) window.close() + } +}; +/** This file is part of KCFinder project + * + * @desc Folder related functionality + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.initFolders = function() { + $('#folders').scroll(function() { + _.menu.hide(); + }).disableTextSelect(); + $('div.folder > a').unbind().click(function() { + _.menu.hide(); + return false; + }); + $('div.folder > a > span.brace').unbind().click(function() { + if ($(this).hasClass('opened') || $(this).hasClass('closed')) + _.expandDir($(this).parent()); + }); + $('div.folder > a > span.folder').unbind().click(function() { + _.changeDir($(this).parent()); + }).rightClick(function(el, e) { + _.menuDir($(el).parent(), e); + }); + if ($.mobile) { + $('div.folder > a > span.folder').on('taphold', function() { + _.menuDir($(this).parent(), { + pageX: $(this).offset().left + 1, + pageY: $(this).offset().top + $(this).outerHeight() + }); + }); + } +}; + +_.setTreeData = function(data, path) { + if (!path) + path = ""; + else if (path.length && (path.substr(path.length - 1, 1) != '/')) + path += "/"; + path += data.name; + var selector = '#folders a[href="kcdir:/' + $.$.escapeDirs(path) + '"]'; + $(selector).data({ + name: data.name, + path: path, + readable: data.readable, + writable: data.writable, + removable: data.removable, + hasDirs: data.hasDirs + }); + $(selector + ' span.folder').addClass(data.current ? 'current' : 'regular'); + if (data.dirs && data.dirs.length) { + $(selector + ' span.brace').addClass('opened'); + $.each(data.dirs, function(i, cdir) { + _.setTreeData(cdir, path + "/"); + }); + } else if (data.hasDirs) + $(selector + ' span.brace').addClass('closed'); +}; + +_.buildTree = function(root, path) { + if (!path) path = ""; + path += root.name; + var cdir, html = '
 ' + $.$.htmlData(root.name) + ''; + if (root.dirs) { + html += '
'; + for (var i = 0; i < root.dirs.length; i++) { + cdir = root.dirs[i]; + html += _.buildTree(cdir, path + "/"); + } + html += '
'; + } + html += '
'; + return html; +}; + +_.expandDir = function(dir) { + var path = dir.data('path'); + if (dir.children('.brace').hasClass('opened')) { + dir.parent().children('.folders').hide(500, function() { + if (path == _.dir.substr(0, path.length)) + _.changeDir(dir); + }); + dir.children('.brace').removeClass('opened').addClass('closed'); + } else { + if (dir.parent().children('.folders').get(0)) { + dir.parent().children('.folders').show(500); + dir.children('.brace').removeClass('closed').addClass('opened'); + } else if (!$('#loadingDirs').get(0)) { + dir.parent().append('
' + _.label("Loading folders...") + '
'); + $('#loadingDirs').hide().show(200, function() { + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("expand"), + data: {dir: path}, + async: false, + success: function(data) { + $('#loadingDirs').hide(200, function() { + $('#loadingDirs').detach(); + }); + if (_.check4errors(data)) + return; + + var html = ""; + $.each(data.dirs, function(i, cdir) { + html += ''; + }); + if (html.length) { + dir.parent().append('
' + html + '
'); + var folders = $(dir.parent().children('.folders').first()); + folders.hide(); + $(folders).show(500); + $.each(data.dirs, function(i, cdir) { + _.setTreeData(cdir, path); + }); + } + if (data.dirs.length) + dir.children('.brace').removeClass('closed').addClass('opened'); + else + dir.children('.brace').removeClass('opened closed'); + _.initFolders(); + _.initDropUpload(); + }, + error: function() { + $('#loadingDirs').detach(); + _.alert(_.label("Unknown error.")); + } + }); + }); + } + } +}; + +_.changeDir = function(dir) { + if (dir.children('span.folder').hasClass('regular')) { + $('div.folder > a > span.folder').removeClass('current regular').addClass('regular'); + dir.children('span.folder').removeClass('regular').addClass('current'); + $('#files').html(_.label("Loading files...")); + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("chDir"), + data: {dir: dir.data('path')}, + async: false, + success: function(data) { + if (_.check4errors(data)) + return; + _.files = data.files; + _.orderFiles(); + _.dir = dir.data('path'); + _.dirWritable = data.dirWritable; + _.setTitle("KCFinder: /" + _.dir); + _.statusDir(); + }, + error: function() { + $('#files').html(_.label("Unknown error.")); + } + }); + } +}; + +_.statusDir = function() { + var i = 0, size = 0; + for (; i < _.files.length; i++) + size += _.files[i].size; + size = _.humanSize(size); + $('#fileinfo').html(_.files.length + " " + _.label("files") + " (" + size + ")"); +}; + +_.refreshDir = function(dir) { + var path = dir.data('path'); + if (dir.children('.brace').hasClass('opened') || dir.children('.brace').hasClass('closed')) + dir.children('.brace').removeClass('opened').addClass('closed'); + dir.parent().children('.folders').first().detach(); + if (path == _.dir.substr(0, path.length)) + _.changeDir(dir); + _.expandDir(dir); + return true; +}; +/** This file is part of KCFinder project + * + * @desc Context menus + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.menu = { + + init: function() { + $('#menu').html("
    ").css('display', 'none'); + }, + + addItem: function(href, label, callback, denied) { + if (typeof denied == "undefined") + denied = false; + + $('#menu ul').append('
  • ' + label + '
  • '); + + if (!denied && $.isFunction(callback)) + $('#menu a[href="' + href + '"]').click(function() { + _.menu.hide(); + return callback(); + }); + }, + + addDivider: function() { + if ($('#menu ul').html().length) + $('#menu ul').append("
  • -
  • "); + }, + + show: function(e) { + var dlg = $('#menu'), + ul = $('#menu ul'); + if (ul.html().length) { + dlg.find('ul').first().menu(); + if (typeof e != "undefined") { + var left = e.pageX, + top = e.pageY, + win = $(window); + + if ((dlg.outerWidth() + left) > win.width()) + left = win.width() - dlg.outerWidth(); + + if ((dlg.outerHeight() + top) > win.height()) + top = win.height() - dlg.outerHeight(); + + dlg.hide().css({ + left: left, + top: top, + width: "" + }).fadeIn('fast'); + } else + dlg.fadeIn('fast'); + } else + ul.detach(); + }, + + hide: function() { + $('#clipboard').removeClass('selected'); + $('div.folder > a > span.folder').removeClass('context'); + $('#menu').hide().css('width', "").html("").data('title', null).unbind().click(function() { + return false; + }); + $(document).unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); + } +}; + +// FILE CONTEXT MENU +_.menuFile = function(file, e) { + _.menu.init(); + + var data = file.data(), + files = $('.file.selected').get(); + + // MULTIPLE FILES MENU + if (file.hasClass('selected') && files.length && (files.length > 1)) { + var thumb = false, + notWritable = 0, + cdata; + + $.each(files, function(i, cfile) { + cdata = $(cfile).data(); + if (cdata.thumb) thumb = true; + if (!data.writable) notWritable++; + }); + + if (_.opener.callBackMultiple) { + + // SELECT FILES + _.menu.addItem("kcact:pick", _.label("Select"), function() { + _.returnFiles(files); + return false; + }); + + // SELECT THUMBNAILS + if (thumb) + _.menu.addItem("kcact:pick_thumb", _.label("Select Thumbnails"), function() { + _.returnThumbnails(files); + return false; + }); + } + + if (data.thumb || data.smallThumb || _.support.zip) { + + _.menu.addDivider(); + + // VIEW IMAGE + if (data.thumb || data.smallThumb) + _.menu.addItem("kcact:view", _.label("View"), function() { + _.viewImage(data); + }); + + // DOWNLOAD + if (_.support.zip) + _.menu.addItem("kcact:download", _.label("Download"), function() { + var pfiles = []; + $.each(files, function(i, cfile) { + pfiles[i] = $(cfile).data('name'); + }); + _.post(_.getURL('downloadSelected'), {dir:_.dir, files:pfiles}); + return false; + }); + } + + // ADD TO CLIPBOARD + if (_.access.files.copy || _.access.files.move) { + _.menu.addDivider(); + _.menu.addItem("kcact:clpbrdadd", _.label("Add to Clipboard"), function() { + var msg = ''; + $.each(files, function(i, cfile) { + var cdata = $(cfile).data(), + failed = false; + for (i = 0; i < _.clipboard.length; i++) + if ((_.clipboard[i].name == cdata.name) && + (_.clipboard[i].dir == _.dir) + ) { + failed = true; + msg += cdata.name + ": " + _.label("This file is already added to the Clipboard.") + "\n"; + break; + } + + if (!failed) { + cdata.dir = _.dir; + _.clipboard[_.clipboard.length] = cdata; + } + }); + _.initClipboard(); + if (msg.length) _.alert(msg.substr(0, msg.length - 1)); + return false; + }); + } + + // DELETE + if (_.access.files['delete']) { + _.menu.addDivider(); + _.menu.addItem("kcact:rm", _.label("Delete"), function() { + if ($(this).hasClass('denied')) return false; + var failed = 0, + dfiles = []; + $.each(files, function(i, cfile) { + var cdata = $(cfile).data(); + if (!cdata.writable) + failed++; + else + dfiles[dfiles.length] = _.dir + "/" + cdata.name; + }); + if (failed == files.length) { + _.alert(_.label("The selected files are not removable.")); + return false; + } + + var go = function(callBack) { + _.fadeFiles(); + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("rm_cbd"), + data: {files:dfiles}, + async: false, + success: function(data) { + if (callBack) callBack(); + _.check4errors(data); + _.refresh(); + }, + error: function() { + if (callBack) callBack(); + $('#files > div').css({ + opacity: "", + filter: "" + }); + _.alert(_.label("Unknown error.")); + } + }); + }; + + if (failed) + _.confirm( + _.label("{count} selected files are not removable. Do you want to delete the rest?", {count:failed}), + go + ); + + else + _.confirm( + _.label("Are you sure you want to delete all selected files?"), + go + ); + + return false; + }, (notWritable == files.length)); + } + + _.menu.show(e); + + // SINGLE FILE MENU + } else { + $('.file').removeClass('selected'); + file.addClass('selected'); + $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); + + if (_.opener.callBack || _.opener.callBackMultiple) { + + // SELECT FILE + _.menu.addItem("kcact:pick", _.label("Select"), function() { + _.returnFile(file); + return false; + }); + + // SELECT THUMBNAIL + if (data.thumb) + _.menu.addItem("kcact:pick_thumb", _.label("Select Thumbnail"), function() { + _.returnFile(_.thumbsURL + "/" + _.dir + "/" + data.name); + return false; + }); + + _.menu.addDivider(); + } + + // VIEW IMAGE + if (data.thumb || data.smallThumb) + _.menu.addItem("kcact:view", _.label("View"), function() { + _.viewImage(data); + }); + + // DOWNLOAD + _.menu.addItem("kcact:download", _.label("Download"), function() { + $('#menu').html('
    '); + $('#downloadForm input').get(0).value = _.dir; + $('#downloadForm input').get(1).value = data.name; + $('#downloadForm').submit(); + return false; + }); + + // ADD TO CLIPBOARD + if (_.access.files.copy || _.access.files.move) { + _.menu.addDivider(); + _.menu.addItem("kcact:clpbrdadd", _.label("Add to Clipboard"), function() { + for (i = 0; i < _.clipboard.length; i++) + if ((_.clipboard[i].name == data.name) && + (_.clipboard[i].dir == _.dir) + ) { + _.alert(_.label("This file is already added to the Clipboard.")); + return false; + } + var cdata = data; + cdata.dir = _.dir; + _.clipboard[_.clipboard.length] = cdata; + _.initClipboard(); + return false; + }); + } + + + if (_.access.files.rename || _.access.files['delete']) + _.menu.addDivider(); + + // RENAME + if (_.access.files.rename) + _.menu.addItem("kcact:mv", _.label("Rename..."), function() { + if (!data.writable) return false; + _.fileNameDialog( + {dir: _.dir, file: data.name}, + 'newName', data.name, _.getURL("rename"), { + title: "New file name:", + errEmpty: "Please enter new file name.", + errSlash: "Unallowable characters in file name.", + errDot: "File name shouldn't begins with '.'" + }, + _.refresh + ); + return false; + }, !data.writable); + + // DELETE + if (_.access.files['delete']) + _.menu.addItem("kcact:rm", _.label("Delete"), function() { + if (!data.writable) return false; + _.confirm(_.label("Are you sure you want to delete this file?"), + function(callBack) { + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("delete"), + data: {dir: _.dir, file: data.name}, + async: false, + success: function(data) { + if (callBack) callBack(); + _.clearClipboard(); + if (_.check4errors(data)) + return; + _.refresh(); + }, + error: function() { + if (callBack) callBack(); + _.alert(_.label("Unknown error.")); + } + }); + } + ); + return false; + }, !data.writable); + + _.menu.show(e); + } + +}; + +// FOLDER CONTEXT MENU +_.menuDir = function(dir, e) { + _.menu.init(); + + var data = dir.data(), + html = '
      '; + + if (_.clipboard && _.clipboard.length) { + + // COPY CLIPBOARD + if (_.access.files.copy) + _.menu.addItem("kcact:cpcbd", _.label("Copy {count} files", {count: _.clipboard.length}), function() { + _.copyClipboard(data.path); + return false; + }, !data.writable); + + // MOVE CLIPBOARD + if (_.access.files.move) + _.menu.addItem("kcact:mvcbd", _.label("Move {count} files", {count: _.clipboard.length}), function() { + _.moveClipboard(data.path); + return false; + }, !data.writable); + + if (_.access.files.copy || _.access.files.move) + _.menu.addDivider(); + } + + // REFRESH + _.menu.addItem("kcact:refresh", _.label("Refresh"), function() { + _.refreshDir(dir); + return false; + }); + + // DOWNLOAD + if (_.support.zip) { + _.menu.addDivider(); + _.menu.addItem("kcact:download", _.label("Download"), function() { + _.post(_.getURL("downloadDir"), {dir:data.path}); + return false; + }); + } + + if (_.access.dirs.create || _.access.dirs.rename || _.access.dirs['delete']) + _.menu.addDivider(); + + // NEW SUBFOLDER + if (_.access.dirs.create) + _.menu.addItem("kcact:mkdir", _.label("New Subfolder..."), function(e) { + if (!data.writable) return false; + _.fileNameDialog( + {dir: data.path}, + "newDir", "", _.getURL("newDir"), { + title: "New folder name:", + errEmpty: "Please enter new folder name.", + errSlash: "Unallowable characters in folder name.", + errDot: "Folder name shouldn't begins with '.'" + }, function() { + _.refreshDir(dir); + _.initDropUpload(); + if (!data.hasDirs) { + dir.data('hasDirs', true); + dir.children('span.brace').addClass('closed'); + } + } + ); + return false; + }, !data.writable); + + // RENAME + if (_.access.dirs.rename) + _.menu.addItem("kcact:mvdir", _.label("Rename..."), function(e) { + if (!data.removable) return false; + _.fileNameDialog( + {dir: data.path}, + "newName", data.name, _.getURL("renameDir"), { + title: "New folder name:", + errEmpty: "Please enter new folder name.", + errSlash: "Unallowable characters in folder name.", + errDot: "Folder name shouldn't begins with '.'" + }, function(dt) { + if (!dt.name) { + _.alert(_.label("Unknown error.")); + return; + } + var currentDir = (data.path == _.dir); + dir.children('span.folder').html($.$.htmlData(dt.name)); + dir.data('name', dt.name); + dir.data('path', $.$.dirname(data.path) + '/' + dt.name); + if (currentDir) + _.dir = dir.data('path'); + _.initDropUpload(); + }, + true + ); + return false; + }, !data.removable); + + // DELETE + if (_.access.dirs['delete']) + _.menu.addItem("kcact:rmdir", _.label("Delete"), function() { + if (!data.removable) return false; + _.confirm( + _.label("Are you sure you want to delete this folder and all its content?"), + function(callBack) { + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("deleteDir"), + data: {dir: data.path}, + async: false, + success: function(data) { + if (callBack) callBack(); + if (_.check4errors(data)) + return; + dir.parent().hide(500, function() { + var folders = dir.parent().parent(); + var pDir = folders.parent().children('a').first(); + dir.parent().detach(); + if (!folders.children('div.folder').get(0)) { + pDir.children('span.brace').first().removeClass('opened closed'); + pDir.parent().children('.folders').detach(); + pDir.data('hasDirs', false); + } + if (pDir.data('path') == _.dir.substr(0, pDir.data('path').length)) + _.changeDir(pDir); + _.initDropUpload(); + }); + }, + error: function() { + if (callBack) callBack(); + _.alert(_.label("Unknown error.")); + } + }); + } + ); + return false; + }, !data.removable); + + _.menu.show(e); + + $('div.folder > a > span.folder').removeClass('context'); + if (dir.children('span.folder').hasClass('regular')) + dir.children('span.folder').addClass('context'); +}; + +// CLIPBOARD MENU +_.openClipboard = function() { + + if (!_.clipboard || !_.clipboard.length) return; + + // CLOSE MENU + if ($('#menu a[href="kcact:clrcbd"]').html()) { + $('#clipboard').removeClass('selected'); + _.menu.hide(); + return; + } + + setTimeout(function() { + _.menu.init(); + + var dlg = $('#menu'), + jStatus = $('#status'), + html = '
    • '; + + // CLIPBOARD FILES + $.each(_.clipboard, function(i, val) { + var icon = $.$.getFileExtension(val.name); + if (val.thumb) + icon = ".image"; + else if (!val.smallIcon || !icon.length) + icon = "."; + icon = "themes/" + _.theme + "/img/files/small/" + icon + ".png"; + html += '' + $.$.htmlData($.$.basename(val.name)) + ''; + }); + html += '
    • -
    • '; + $('#menu ul').append(html); + + // DOWNLOAD + if (_.support.zip) + _.menu.addItem("kcact:download", _.label("Download files"), function() { + _.downloadClipboard(); + return false; + }); + + if (_.access.files.copy || _.access.files.move || _.access.files['delete']) + _.menu.addDivider(); + + // COPY + if (_.access.files.copy) + _.menu.addItem("kcact:cpcbd", _.label("Copy files here"), function() { + if (!_.dirWritable) return false; + _.copyClipboard(_.dir); + return false; + }, !_.dirWritable); + + // MOVE + if (_.access.files.move) + _.menu.addItem("kcact:mvcbd", _.label("Move files here"), function() { + if (!_.dirWritable) return false; + _.moveClipboard(_.dir); + return false; + }, !_.dirWritable); + + // DELETE + if (_.access.files['delete']) + _.menu.addItem("kcact:rmcbd", _.label("Delete files"), function() { + _.confirm( + _.label("Are you sure you want to delete all files in the Clipboard?"), + function(callBack) { + if (callBack) callBack(); + _.deleteClipboard(); + } + ); + return false; + }); + + _.menu.addDivider(); + + // CLEAR CLIPBOARD + _.menu.addItem("kcact:clrcbd", _.label("Clear the Clipboard"), function() { + _.clearClipboard(); + return false; + }); + + $('#clipboard').addClass('selected'); + _.menu.show(); + + var left = $(window).width() - dlg.css({width: ""}).outerWidth(), + top = $(window).height() - dlg.outerHeight() - jStatus.outerHeight(), + lheight = top + dlg.outerTopSpace(); + + dlg.find('.list').css({ + 'max-height': lheight, + 'overflow-y': "auto", + 'overflow-x': "hidden", + width: "" + }); + + top = $(window).height() - dlg.outerHeight(true) - jStatus.outerHeight(true); + + dlg.css({ + left: left - 5, + top: top + }).fadeIn("fast"); + + var a = dlg.find('.list').outerHeight(), + b = dlg.find('.list div').outerHeight(); + + if (b - a > 10) { + dlg.css({ + left: parseInt(dlg.css('left')) - _.scrollbarWidth, + }).width(dlg.width() + _.scrollbarWidth); + } + }, 1); +}; +/** This file is part of KCFinder project + * + * @desc Image viewer + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.viewImage = function(data) { + + var ts = new Date().getTime(), + dlg = false, + images = [], + + showImage = function(data) { + _.lock = true; + $('#loading').html(_.label("Loading image...")).show(); + + var url = $.$.escapeDirs(_.uploadURL + "/" + _.dir + "/" + data.name) + "?ts=" + ts, + img = new Image(), + i = $(img), + w = $(window), + d = $(document); + + onImgLoad = function() { + _.lock = false; + + $('#files .file').each(function() { + if ($(this).data('name') == data.name) { + _.ssImage = this; + return false; + } + }); + + i.hide().appendTo('body'); + + var o_w = i.width(), + o_h = i.height(), + i_w = o_w, + i_h = o_h, + + goTo = function(i) { + if (!_.lock) { + var nimg = images[i]; + _.currImg = i; + showImage(nimg); + } + }, + + nextFunc = function() { + goTo((_.currImg >= images.length - 1) ? 0 : (_.currImg + 1)); + }, + + prevFunc = function() { + goTo((_.currImg ? _.currImg : images.length) - 1); + }, + + t = $('
      '); + + i.detach().appendTo(t); + t.addClass("img"); + + if (!dlg) { + + var ww = w.width() - 60, + + closeFunc = function() { + d.unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); + dlg.dialog('destroy').detach(); + }; + + if ((ww % 2)) ww++; + + dlg = _.dialog($.$.htmlData(data.name), t.get(0), { + width: ww, + height: w.height() - 36, + position: [30, 30], + draggable: false, + nopadding: true, + close: closeFunc, + show: false, + hide: false, + buttons: [ + { + text: _.label("Previous"), + icons: {primary: "ui-icon-triangle-1-w"}, + click: prevFunc + + }, { + text: _.label("Next"), + icons: {secondary: "ui-icon-triangle-1-e"}, + click: nextFunc + + }, { + text: _.label("Select"), + icons: {primary: "ui-icon-check"}, + click: function(e) { + d.unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); + if (_.ssImage) { + _.selectFile($(_.ssImage), e); + } + dlg.dialog('destroy').detach(); + } + + }, { + text: _.label("Close"), + icons: {primary: "ui-icon-closethick"}, + click: closeFunc + } + ] + }); + + dlg.addClass('kcfImageViewer').css('overflow', "hidden").parent().find('.ui-dialog-buttonpane button').get(2).focus(); + + } else { + dlg.prev().find('.ui-dialog-title').html($.$.htmlData(data.name)); + dlg.html(t.get(0)); + } + + dlg.unbind('click').click(nextFunc).disableTextSelect(); + + var d_w = dlg.innerWidth(), + d_h = dlg.innerHeight(); + + if ((o_w > d_w) || (o_h > d_h)) { + i_w = d_w; + i_h = d_h; + if ((d_w / d_h) > (o_w / o_h)) + i_w = parseInt((o_w * d_h) / o_h); + else if ((d_w / d_h) < (o_w / o_h)) + i_h = parseInt((o_h * d_w) / o_w); + } + + i.css({ + width: i_w, + height: i_h + }).show().parent().css({ + display: "block", + margin: "0 auto", + width: i_w, + height: i_h, + marginTop: parseInt((d_h - i_h) / 2) + }); + + $('#loading').hide(); + + d.unbind('keydown').keydown(function(e) { + if (!_.lock) { + var kc = e.keyCode; + if ((kc == 37)) prevFunc(); + if ((kc == 39)) nextFunc(); + } + }); + }; + + img.src = url; + + if (img.complete) + onImgLoad(); + else { + img.onload = onImgLoad; + img.onerror = function() { + _.lock = false; + $('#loading').hide(); + _.alert(_.label("Unknown error.")); + d.unbind('keydown').keydown(function(e) { + return !_.selectAll(e); + }); + _.refresh(); + }; + } + }; + + $.each(_.files, function(i, file) { + var i = images.length; + if (file.thumb || file.smallThumb) + images[i] = file; + if (file.name == data.name) + _.currImg = i; + }); + + showImage(data); + return false; +}; +/** This file is part of KCFinder project + * + * @desc Clipboard functionality + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.initClipboard = function() { + if (!_.clipboard || !_.clipboard.length) return; + + var size = 0, + jClipboard = $('#clipboard'); + + $.each(_.clipboard, function(i, val) { + size += val.size; + }); + size = _.humanSize(size); + jClipboard.disableTextSelect().html('
      '); + var resize = function() { + jClipboard.css({ + left: $(window).width() - jClipboard.outerWidth(), + top: $(window).height() - jClipboard.outerHeight() + }); + }; + resize(); + jClipboard.show(); + $(window).unbind().resize(function() { + _.resize(); + resize(); + }); +}; + +_.removeFromClipboard = function(i) { + if (!_.clipboard || !_.clipboard[i]) return false; + if (_.clipboard.length == 1) { + _.clearClipboard(); + _.menu.hide(); + return; + } + + if (i < _.clipboard.length - 1) { + var last = _.clipboard.slice(i + 1); + _.clipboard = _.clipboard.slice(0, i); + _.clipboard = _.clipboard.concat(last); + } else + _.clipboard.pop(); + + _.initClipboard(); + _.menu.hide(); + _.openClipboard(); + return true; +}; + +_.copyClipboard = function(dir) { + if (!_.clipboard || !_.clipboard.length) return; + var files = [], + failed = 0; + for (i = 0; i < _.clipboard.length; i++) + if (_.clipboard[i].readable) + files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; + else + failed++; + if (_.clipboard.length == failed) { + _.alert(_.label("The files in the Clipboard are not readable.")); + return; + } + var go = function(callBack) { + if (dir == _.dir) + _.fadeFiles(); + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("cp_cbd"), + data: {dir: dir, files: files}, + async: false, + success: function(data) { + if (callBack) callBack(); + _.check4errors(data); + _.clearClipboard(); + if (dir == _.dir) + _.refresh(); + }, + error: function() { + if (callBack) callBack(); + $('#files > div').css({ + opacity: "", + filter: "" + }); + _.alert(_.label("Unknown error.")); + } + }); + }; + + if (failed) + _.confirm( + _.label("{count} files in the Clipboard are not readable. Do you want to copy the rest?", {count:failed}), + go + ) + else + go(); + +}; + +_.moveClipboard = function(dir) { + if (!_.clipboard || !_.clipboard.length) return; + var files = [], + failed = 0; + for (i = 0; i < _.clipboard.length; i++) + if (_.clipboard[i].readable && _.clipboard[i].writable) + files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; + else + failed++; + if (_.clipboard.length == failed) { + _.alert(_.label("The files in the Clipboard are not movable.")) + return; + } + + var go = function(callBack) { + _.fadeFiles(); + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("mv_cbd"), + data: {dir: dir, files: files}, + async: false, + success: function(data) { + if (callBack) callBack(); + _.check4errors(data); + _.clearClipboard(); + _.refresh(); + }, + error: function() { + if (callBack) callBack(); + $('#files > div').css({ + opacity: "", + filter: "" + }); + _.alert(_.label("Unknown error.")); + } + }); + }; + + if (failed) + _.confirm( + _.label("{count} files in the Clipboard are not movable. Do you want to move the rest?", {count: failed}), + go + ); + else + go(); +}; + +_.deleteClipboard = function() { + if (!_.clipboard || !_.clipboard.length) return; + var files = [], + failed = 0; + for (i = 0; i < _.clipboard.length; i++) + if (_.clipboard[i].readable && _.clipboard[i].writable) + files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; + else + failed++; + if (_.clipboard.length == failed) { + _.alert(_.label("The files in the Clipboard are not removable.")) + return; + } + var go = function(callBack) { + _.fadeFiles(); + $.ajax({ + type: "post", + dataType: "json", + url: _.getURL("rm_cbd"), + data: {files:files}, + async: false, + success: function(data) { + if (callBack) callBack(); + _.check4errors(data); + _.clearClipboard(); + _.refresh(); + }, + error: function() { + if (callBack) callBack(); + $('#files > div').css({ + opacity: "", + filter: "" + }); + _.alert(_.label("Unknown error.")); + } + }); + }; + if (failed) + _.confirm( + _.label("{count} files in the Clipboard are not removable. Do you want to delete the rest?", {count: failed}), + go + ); + else + go(); +}; + +_.downloadClipboard = function() { + if (!_.clipboard || !_.clipboard.length) return; + var files = []; + for (i = 0; i < _.clipboard.length; i++) + if (_.clipboard[i].readable) + files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; + if (files.length) + _.post(_.getURL('downloadClipboard'), {files:files}); +}; + +_.clearClipboard = function() { + $('#clipboard').html(""); + _.clipboard = []; +}; +/** This file is part of KCFinder project + * + * @desc Upload files using drag and drop + * @package KCFinder + * @version 3.12 + * @author Forum user (updated by Pavel Tzonkov) + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.initDropUpload = function() { + if ((typeof XMLHttpRequest == "undefined") || + (typeof document.addEventListener == "undefined") || + (typeof File == "undefined") || + (typeof FileReader == "undefined") + ) + return; + + if (!XMLHttpRequest.prototype.sendAsBinary) { + XMLHttpRequest.prototype.sendAsBinary = function(datastr) { + var ords = Array.prototype.map.call(datastr, function(x) { + return x.charCodeAt(0) & 0xff; + }), + ui8a = new Uint8Array(ords); + this.send(ui8a.buffer); + } + } + + var uploadQueue = [], + uploadInProgress = false, + filesCount = 0, + errors = [], + files = $('#files'), + folders = $('div.folder > a'), + boundary = "------multipartdropuploadboundary" + (new Date).getTime(), + currentFile, + + filesDragOver = function(e) { + if (e.preventDefault) e.preventDefault(); + $('#files').addClass('drag'); + return false; + }, + + filesDragEnter = function(e) { + if (e.preventDefault) e.preventDefault(); + return false; + }, + + filesDragLeave = function(e) { + if (e.preventDefault) e.preventDefault(); + $('#files').removeClass('drag'); + return false; + }, + + filesDrop = function(e) { + if (e.preventDefault) e.preventDefault(); + if (e.stopPropagation) e.stopPropagation(); + $('#files').removeClass('drag'); + if (!$('#folders span.current').first().parent().data('writable')) { + _.alert("Cannot write to upload folder."); + return false; + } + filesCount += e.dataTransfer.files.length; + for (var i = 0; i < e.dataTransfer.files.length; i++) { + var file = e.dataTransfer.files[i]; + file.thisTargetDir = _.dir; + uploadQueue.push(file); + } + processUploadQueue(); + return false; + }, + + folderDrag = function(e) { + if (e.preventDefault) e.preventDefault(); + return false; + }, + + folderDrop = function(e, dir) { + if (e.preventDefault) e.preventDefault(); + if (e.stopPropagation) e.stopPropagation(); + if (!$(dir).data('writable')) { + _.alert(_.label("Cannot write to upload folder.")); + return false; + } + filesCount += e.dataTransfer.files.length; + for (var i = 0; i < e.dataTransfer.files.length; i++) { + var file = e.dataTransfer.files[i]; + file.thisTargetDir = $(dir).data('path'); + uploadQueue.push(file); + } + processUploadQueue(); + return false; + }; + + files.get(0).removeEventListener('dragover', filesDragOver, false); + files.get(0).removeEventListener('dragenter', filesDragEnter, false); + files.get(0).removeEventListener('dragleave', filesDragLeave, false); + files.get(0).removeEventListener('drop', filesDrop, false); + + files.get(0).addEventListener('dragover', filesDragOver, false); + files.get(0).addEventListener('dragenter', filesDragEnter, false); + files.get(0).addEventListener('dragleave', filesDragLeave, false); + files.get(0).addEventListener('drop', filesDrop, false); + + folders.each(function() { + var folder = this, + + dragOver = function(e) { + $(folder).children('span.folder').addClass('context'); + return folderDrag(e); + }, + + dragLeave = function(e) { + $(folder).children('span.folder').removeClass('context'); + return folderDrag(e); + }, + + drop = function(e) { + $(folder).children('span.folder').removeClass('context'); + return folderDrop(e, folder); + }; + + this.removeEventListener('dragover', dragOver, false); + this.removeEventListener('dragenter', folderDrag, false); + this.removeEventListener('dragleave', dragLeave, false); + this.removeEventListener('drop', drop, false); + + this.addEventListener('dragover', dragOver, false); + this.addEventListener('dragenter', folderDrag, false); + this.addEventListener('dragleave', dragLeave, false); + this.addEventListener('drop', drop, false); + }); + + function updateProgress(evt) { + var progress = evt.lengthComputable + ? Math.round((evt.loaded * 100) / evt.total) + '%' + : Math.round(evt.loaded / 1024) + " KB"; + $('#loading').html(_.label("Uploading file {number} of {count}... {progress}", { + number: filesCount - uploadQueue.length, + count: filesCount, + progress: progress + })); + } + + function processUploadQueue() { + if (uploadInProgress) + return false; + + if (uploadQueue && uploadQueue.length) { + var file = uploadQueue.shift(); + currentFile = file; + $('#loading').html(_.label("Uploading file {number} of {count}... {progress}", { + number: filesCount - uploadQueue.length, + count: filesCount, + progress: "" + })).show(); + + var reader = new FileReader(); + reader.thisFileName = file.name; + reader.thisFileType = file.type; + reader.thisFileSize = file.size; + reader.thisTargetDir = file.thisTargetDir; + + reader.onload = function(evt) { + uploadInProgress = true; + + var postbody = '--' + boundary + '\r\nContent-Disposition: form-data; name="upload[]"'; + if (evt.target.thisFileName) + postbody += '; filename="' + $.$.utf8encode(evt.target.thisFileName) + '"'; + postbody += '\r\n'; + if (evt.target.thisFileSize) + postbody += "Content-Length: " + evt.target.thisFileSize + "\r\n"; + postbody += "Content-Type: " + evt.target.thisFileType + "\r\n\r\n" + evt.target.result + "\r\n--" + boundary + '\r\nContent-Disposition: form-data; name="dir"\r\n\r\n' + $.$.utf8encode(evt.target.thisTargetDir) + "\r\n--" + boundary + "\r\n--" + boundary + "--\r\n"; + + var xhr = new XMLHttpRequest(); + xhr.thisFileName = evt.target.thisFileName; + + if (xhr.upload) { + xhr.upload.thisFileName = evt.target.thisFileName; + xhr.upload.addEventListener("progress", updateProgress, false); + } + xhr.open('post', _.getURL('upload'), true); + xhr.setRequestHeader('Content-Type', "multipart/form-data; boundary=" + boundary); + //xhr.setRequestHeader('Content-Length', postbody.length); + + xhr.onload = function(e) { + $('#loading').hide(); + if (_.dir == reader.thisTargetDir) + _.fadeFiles(); + uploadInProgress = false; + processUploadQueue(); + if (xhr.responseText.substr(0, 1) != "/") + errors[errors.length] = xhr.responseText; + }; + + xhr.sendAsBinary(postbody); + }; + + reader.onerror = function(evt) { + $('#loading').hide(); + uploadInProgress = false; + processUploadQueue(); + errors[errors.length] = _.label("Failed to upload {filename}!", { + filename: evt.target.thisFileName + }); + }; + + reader.readAsBinaryString(file); + + } else { + filesCount = 0; + var loop = setInterval(function() { + if (uploadInProgress) return; + boundary = "------multipartdropuploadboundary" + (new Date).getTime(); + uploadQueue = []; + clearInterval(loop); + if (currentFile.thisTargetDir == _.dir) + _.refresh(); + if (errors.length) { + errors = errors.join("\n"); + if (errors.replace(/^\s+/g, "").replace(/\s+$/g, "").length) + _.alert(errors); + errors = []; + } + }, 333); + } + } +}; +/** This file is part of KCFinder project + * + * @desc Miscellaneous functionality + * @package KCFinder + * @version 3.12 + * @author Pavel Tzonkov + * @copyright 2010-2014 KCFinder Project + * @license http://opensource.org/licenses/GPL-3.0 GPLv3 + * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 + * @link http://kcfinder.sunhater.com + */ + +_.orderFiles = function(callBack, selected) { + var order = $.$.kuki.get('order'), + desc = ($.$.kuki.get('orderDesc') == "on"), + a1, b1, arr; + + if (!_.files || !_.files.sort) + _.files = []; + + _.files = _.files.sort(function(a, b) { + if (!order) order = "name"; + + if (order == "date") { + a1 = a.mtime; + b1 = b.mtime; + } else if (order == "type") { + a1 = $.$.getFileExtension(a.name); + b1 = $.$.getFileExtension(b.name); + } else if (order == "size") { + a1 = a.size; + b1 = b.size; + } else { + a1 = a[order].toLowerCase(); + b1 = b[order].toLowerCase(); + } + + if ((order == "size") || (order == "date")) { + if (a1 < b1) return desc ? 1 : -1; + if (a1 > b1) return desc ? -1 : 1; + } + + if (a1 == b1) { + a1 = a.name.toLowerCase(); + b1 = b.name.toLowerCase(); + arr = [a1, b1]; + arr = arr.sort(); + return (arr[0] == a1) ? -1 : 1; + } + + arr = [a1, b1]; + arr = arr.sort(); + if (arr[0] == a1) return desc ? 1 : -1; + return desc ? -1 : 1; + }); + + _.showFiles(callBack, selected); + _.initFiles(); +}; + +_.humanSize = function(size) { + if (size < 1024) { + size = size.toString() + " B"; + } else if (size < 1048576) { + size /= 1024; + size = parseInt(size).toString() + " KB"; + } else if (size < 1073741824) { + size /= 1048576; + size = parseInt(size).toString() + " MB"; + } else if (size < 1099511627776) { + size /= 1073741824; + size = parseInt(size).toString() + " GB"; + } else { + size /= 1099511627776; + size = parseInt(size).toString() + " TB"; + } + return size; +}; + +_.getURL = function(act) { + var url = "browse.php?type=" + encodeURIComponent(_.type) + "&lng=" + encodeURIComponent(_.lang); + if (_.opener.name) + url += "&opener=" + encodeURIComponent(_.opener.name); + if (act) + url += "&act=" + encodeURIComponent(act); + if (_.cms) + url += "&cms=" + encodeURIComponent(_.cms); + return url; +}; + +_.label = function(index, data) { + var label = _.labels[index] ? _.labels[index] : index; + if (data) + $.each(data, function(key, val) { + label = label.replace("{" + key + "}", val); + }); + return label; +}; + +_.check4errors = function(data) { + if (!data.error) + return false; + var msg = data.error.join + ? data.error.join("\n") + : data.error; + _.alert(msg); + return true; +}; + +_.post = function(url, data) { + var html = '
      '; + $.each(data, function(key, val) { + if ($.isArray(val)) + $.each(val, function(i, aval) { + html += ''; + }); + else + html += ''; + }); + if(typeof _.csrftoken!="undefined") + html += ''; + + html += '
      '; + $('#menu').html(html).show(); + $('#postForm').get(0).submit(); +}; + +_.fadeFiles = function() { + $('#files > div').css({ + opacity: "0.4", + filter: "alpha(opacity=40)" + }); +}; diff --git a/third_party/kcfinder/cache/theme_default.css b/third_party/kcfinder/cache/theme_default.css new file mode 100644 index 00000000000..35b2f738e67 --- /dev/null +++ b/third_party/kcfinder/cache/theme_default.css @@ -0,0 +1,2440 @@ +/* + +This CSS code is generated from http://ui.sunhater.com +(c)2014 Pavel Tzonkov, sunhater.com. All rights reserved. + +*/ +/*** jQueryUI */ +/** Base */ + +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:alpha(opacity=0); +} + +.ui-front { + z-index: 100; +} + +.ui-widget .ui-widget, +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #888; + background: #fff; + color: #6B6B6B; +} +.ui-widget-content a { + color: #6B6B6B; +} +.ui-widget-header { + border: 1px solid #1b79b8; + color: #fff; + font-weight: bold; + background: #1b79b8; + background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); + background: -moz-linear-gradient(top, #1b79b8, #59b5f2); + background: -ms-linear-gradient(top, #1b79b8, #59b5f2); + background: -o-linear-gradient(top, #1b79b8, #59b5f2); + background: linear-gradient(to bottom, #1b79b8, #59b5f2); +} +.ui-widget-header a { + color: #fff; +} + +/* Interaction states +----------------------------------*/ + +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default, +.ui-widget.ui-state-disabled { + transition: .2s; + border: 1px solid #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #ababab, #6b6b6b); + background: -moz-linear-gradient(top, #ababab, #6b6b6b); + background: -ms-linear-gradient(top, #ababab, #6b6b6b); + background: -o-linear-gradient(top, #ababab, #6b6b6b); + background: linear-gradient(to bottom, #ababab, #6b6b6b); + font-weight: bold; + color: #fff; +} + +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + transition: .2s; + border: 1px solid #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #6b6b6b, #ababab); + background: -moz-linear-gradient(top, #6b6b6b, #ababab); + background: -ms-linear-gradient(top, #6b6b6b, #ababab); + background: -o-linear-gradient(top, #6b6b6b, #ababab); + background: linear-gradient(to bottom, #6b6b6b, #ababab); + font-weight: bold; + color: #fff; +} + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +.ui-menu .ui-state-focus { + transition: .2s; + border: 1px solid #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); + background: -moz-linear-gradient(top, #1b79b8, #59b5f2); + background: -ms-linear-gradient(top, #1b79b8, #59b5f2); + background: -o-linear-gradient(top, #1b79b8, #59b5f2); + background: linear-gradient(to bottom, #1b79b8, #59b5f2); + font-weight: bold; + color: #fff; +} + +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited, +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + transition: .2s; + color: #fff; + text-decoration: none; +} + +.ui-menu .ui-state-active { + transition: .2s; + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #6b6b6b, #ababab); + background: -moz-linear-gradient(top, #6b6b6b, #ababab); + background: -ms-linear-gradient(top, #6b6b6b, #ababab); + background: -o-linear-gradient(top, #6b6b6b, #ababab); + background: linear-gradient(to bottom, #6b6b6b, #ababab); +} + +/* Interaction Cues +----------------------------------*/ + +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #d5bc2c; + box-shadow: inset 0 0 5px #d5bc2c; + background: #fff6bf; + color: #6b6b6b; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cf7f7f; + box-shadow: inset 0 0 5px #cf7f7f; + background: #fac4c4; + color: #6b6b6b; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a, +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a, +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #6b6b6b; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .5; + filter:alpha(opacity=50); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .50; + filter:alpha(opacity=50); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:alpha(opacity=50); /* For IE8 - See #6059 */ +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} + + +/** Accordion */ + +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin-top: 2px; + padding: 6px; + min-height: 0; /* support: IE7 */ +} +.ui-accordion .ui-accordion-icons, +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 24px; +} +.ui-accordion .ui-accordion-noicons { + padding-left: 5px; +} + +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: 5px; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em; + border-top: 0; + overflow: auto; +} + + +/** Autocomplete */ + +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: pointer; +} + + +/** Button */ + +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 36px; +} +.ui-button-icons-only { + width: 50px; +} +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: 6px 10px; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: 6px; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 6px 10px 6px 28px; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 6px 28px 6px 10px; +} +.ui-button-text-icons .ui-button-text { + padding-left: 28px; + padding-right: 28px; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: 6px 10px; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: 7px; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: 7px; +} +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} + + +/** Button set */ + +.ui-buttonset { + margin:0; + overflow:auto; +} +.ui-buttonset .ui-button { + margin: 0; + float:left; +} + + +/** Date picker */ + +.ui-datepicker { + width: 19em; + width: 19em; + display: none; + padding: 10px; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: 2px 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 4px; + width: 20px; + height: 20px; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 3px; +} +.ui-datepicker .ui-datepicker-prev { + left: 4px; +} +.ui-datepicker .ui-datepicker-next { + right: 4px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 3px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 3px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 10px; + padding: 4px 0; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin:-2px 2px; + padding:0; + outline:0; +} +.ui-datepicker table { + width: 100%; + border-collapse: collapse; + margin: 0; + font-size: 1em; +} +.ui-datepicker th { + padding: 3px; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: 2px 3px; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: 10px -11px -11px -11px; + padding: 10px; + border: 1px solid #1b79b8; + background: #e4f5ff; + overflow: auto; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + cursor: pointer; + width: auto; + overflow: visible; + margin: 0; + padding: 6px 10px; + font-weight: bold; + opacity: 1; + filter: alpha(opacity=100); +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; + padding:10px; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group .ui-datepicker-header { + margin:0; +} +.ui-datepicker-multi .ui-datepicker-group.ui-datepicker-group-last { + margin-right:0; +} + +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} + +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + font-size: 0; + width: 100px; +} +th.ui-datepicker-week-col { + color: #215b82; +} +td.ui-datepicker-week-col { + text-align:right; + padding-right:7px; + color: #215b82; +} +td.ui-datepicker-other-month a.ui-state-default { + font-weight: bold; +} +th.ui-datepicker-week-end { + color: #f44; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} + + +/** Dialog */ + +.ui-dialog { + position: absolute; + top: 0; + left: 0; + padding: 4px; + outline: 0; + box-shadow: 0 0 10px #000; +} +.ui-dialog .ui-dialog-titlebar { + padding: 5px 10px; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: 0; + padding: 1px 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 21px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: 1em; + margin: 0 -4px; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + padding: 10px; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: 0 0 0 5px; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} + + +/** Menu */ + +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: 0; +} +.ui-menu .ui-menu { + margin-top: -3px; + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + padding: 0; + width: 100%; + /* support: IE10, see #8844 */ + list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); +} +.ui-menu .ui-menu-divider { + margin: 1px 10px 1px 10px; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; + border-color: #bbb; +} +.ui-menu .ui-menu-item a { + text-decoration: none; + display: block; + padding: 5px 10px; + line-height: 1.5; + min-height: 0; /* support: IE7 */ + font-weight: normal; + border-radius:0; +} +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; + transition: none; +} +.ui-menu .ui-state-disabled { + font-weight: normal; + line-height: 1.5; +} +.ui-menu .ui-state-disabled a { + cursor: default; +} +.ui-menu.ui-corner-all.sh-menu { + border-radius: 4px; +} +.ui-menu.ui-corner-all, .ui-menu.sh-menu.ui-autocomplete.ui-corner-all { + border-radius: 0; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item a { + position: relative; + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: .2em; + left: .2em; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + position: static; + float: right; +} + + +/** Progress bar */ + +.ui-progressbar { + height: 2.1em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + height: 100%; + filter: alpha(opacity=25); + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} + + +/** Slider */ + +.ui-slider { + position: relative; + text-align: left; + margin: 0 13px; + border-radius:15px; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 18px; + height: 18px; + border-radius: 9px; + cursor: default; + box-shadow: 0 0 3px #6b6b6b, inset 0 0 7px #fff, inset 0 0 3px #fff; +} +.ui-slider .ui-slider-handle.ui-state-active { + box-shadow: 0 0 3px #1b79b8, inset 0 0 7px #fff, inset 0 0 3px #fff; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + display: block; + border: 0; + background-position: 0 0; +} + +/* For IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: 10px; +} +.ui-slider-horizontal .ui-slider-handle { + top: -5px; + margin-left: -9px; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: 10px; + height: 150px; +} +.ui-slider-vertical .ui-slider-handle { + left: -5px; + margin-left: 0; + margin-bottom: -9px; +} +.ui-slider-vertical .ui-slider-range { + left: -1px; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} + + +/** Spinner */ + +.ui-spinner.ui-widget { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); +} +.ui-spinner-input { + border: none; + color: inherit; + padding: 0; + margin: 6px 24px 6px 10px; + vertical-align: middle; + outline: 0; + background: transparent; +} +.ui-spinner-input { + color: #6b6b6b} +.ui-spinner-input:focus { + color: #000; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to overide default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertical centre icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} + + +/** Tabs */ + +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: 3px 3px 0 3px; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px 3px 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav li a { + float: left; + padding: 6px 10px; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active a, +.ui-tabs .ui-tabs-nav li.ui-state-disabled a, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading a { + cursor: text; +} +.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em; + background: none; +} + +/** Tooltip */ + +body .ui-tooltip { + padding: 6px 10px; + position: absolute; + z-index: 9999; + max-width: 300px; + color: #808080; + border-color: #a5a5a5; + box-shadow: inset 0 0 4px #a5a5a5, 0 0 4px #a5a5a5; + background: -webkit-linear-gradient(top, #ddd, #fff); + background: -moz-linear-gradient(top, #ddd, #fff); + background: -ms-linear-gradient(top, #ddd, #fff); + background: -o-linear-gradient(top, #ddd, #fff); + background: linear-gradient(to bottom, #ddd, #fff); +} + +/** Icons */ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; + width: 16px; + height: 16px; +} + +.ui-icon, +.ui-widget-content .ui-icon, +.ui-state-highlight .ui-icon, +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon, +.ui-icon.ui-icon-black { + background-image: url(img/ui-icons_black.png); +} + +.ui-widget-header .ui-icon, +.ui-state-default .ui-icon, +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon, +.ui-state-active .ui-icon, +.ui-icon.ui-icon-white { + background-image: url(img/ui-icons_white.png); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/** Misc */ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl, +.ui-menu .ui-menu-item.ui-menu-item-first a { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr, +.ui-menu .ui-menu-item.ui-menu-item-first a { + border-top-right-radius:4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl, +.ui-menu .ui-menu-item.ui-menu-item-last a, +.ui-dialog-buttonpane, +.ui-datepicker-multi .ui-datepicker-group-first .ui-datepicker-header, +.ui-datepicker .ui-datepicker-buttonpane { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br, +.ui-menu .ui-menu-item.ui-menu-item-last a, +.ui-dialog-buttonpane, +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker .ui-datepicker-buttonpane { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: rgba(255,255,255,.5); +} +.ui-widget-shadow { + margin: -7px 0 0 -7px; + padding: 7px; + background: rgba(0,0,0,.3); + border-radius: 8px; +} + +/* SunHater Fixes */ + +.ui-accordion-content-active, .ui-tabs, .ui-slider-range, .ui-datepicker, .ui-dialog { + border-color: #1b79b8; +} + +.ui-slider .ui-slider-range { + border: 1px solid #1b79b8; + top: -1px +} + +.ui-progressbar { + overflow:visible; +} +.ui-progressbar-value { + border: 1px solid #1b79b8; + margin-top: -1px +} + +.ui-accordion-header, +.ui-tabs-nav, +.ui-button, +.ui-tabs li, +.ui-slider-handle, +.ui-slider-range, +.ui-datepicker-header, +.ui-datepicker-header a:hover, +.ui-datepicker-calendar .ui-state-default, +.ui-progressbar-value, +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active, +.ui-dialog-titlebar, +.ui-dialog-titlebar-close.ui-state-default.ui-state-hover, +.ui-datepicker .ui-datepicker-buttonpane button { + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} + +.ui-spinner, +.ui-menu { + box-shadow: inset 0 0 4px #6b6b6b; +} + +.ui-accordion-content, +.ui-tabs, +.ui-dialog-content, +.ui-dialog-buttonpane, +.ui-datepicker, +.ui-datepicker .ui-datepicker-buttonpane { + box-shadow: inset 0 0 4px #1b79b8; +} + +.ui-state-default, +.ui-state-focus, +.ui-state-active, +.ui-widget-header { + text-shadow: + 1px 0 rgba(0,0,0,.2), + -1px 0 rgba(0,0,0,.2), + 0 -1px rgba(0,0,0,.2), + 0 1px rgba(0,0,0,.2), + 1px 1px rgba(0,0,0,.2), + -1px -1px rgba(0,0,0,.2), + 1px -1px rgba(0,0,0,.2), + -1px 1px rgba(0,0,0,.2); +} + +.ui-tabs .ui-state-active, +.ui-datepicker .ui-state-highlight { + text-shadow: none; +} +.ui-datepicker .ui-state-highlight { + color: #215b82; + border-color: #1b79b8; + box-shadow: inset 0 0 4px #1b79b8; + background: #fff; + background: -webkit-linear-gradient(top, #dfeef8, #fff); + background: -moz-linear-gradient(top, #dfeef8, #fff); + background: -ms-linear-gradient(top, #dfeef8, #fff); + background: -o-linear-gradient(top, #dfeef8, #fff); + background: linear-gradient(to bottom, #dfeef8, #fff); +} + +.ui-progressbar, .ui-slider, .ui-menu { + box-shadow: inset 0 0 4px #6b6b6b; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); +} + +.ui-slider, .ui-spinner, .ui-progressbar, .ui-menu { + border-color: #6b6b6b; +} + +.ui-datepicker-calendar .ui-state-default { + border-radius: 3px; +} + +.ui-tabs .ui-tabs-nav { + margin: -1px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + padding-left:3px; +} + +.ui-tabs-active.ui-state-active { + background: #fff; + background: -webkit-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); + background: -moz-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); + background: -ms-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); + background: -o-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); + background: linear-gradient(to bottom, #ccc, #ddd, #eee, #fff, #fff, #fff); + box-shadow: inset 0 0 5px #fff, inset 0 0 5px #fff, inset 0 0 5px #fff; +} +.ui-tabs-active.ui-state-active a { + color: #215b82; +} +.ui-state-default, .ui-state-default a { + outline: 0; +} +.ui-datepicker-header, +.ui-dialog-titlebar { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + margin: -5px -5px 0 -5px; +} +.ui-datepicker-header { + margin: -11px -11px 5px -11px; +} + +.ui-datepicker-header a:hover { + cursor: pointer; +} + +.ui-dialog-titlebar-close.ui-state-default { + border-color: transparent; + background: none; + box-shadow: none; +} + +.ui-dialog-titlebar-close.ui-state-default.ui-state-hover { + border-color: #6b6b6b; + background: #6b6b6b} + +.ui-dialog-buttonpane { + background: #e4f5ff; + border-top-color: #1b79b8; + margin: 0 -4px -4px -4px; + padding: 0; +} + +/*** Uniform */ +/* Remove default webkit and possible mozilla .search styles. + * Keeping this as :active to remove browser styles */ +div.checker input, +input[type="search"], +input[type="search"]:active { + -moz-appearance: none; + -webkit-appearance: none; +} + +div.selector, +div.selector span, +div.checker span, +div.radio span, +div.uploader, +div.uploader +span.action, +div.button, +div.button span { + -webkit-font-smoothing: antialiased; +} + +div.selector, +div.checker, +div.button, +div.radio, +div.uploader { + display: -moz-inline-box; + display: inline-block; + zoom: 1; + vertical-align: middle; +} + +div.checker span, +div.checker input, +div.radio span, +div.radio input, +div.button span { + display: -moz-inline-box; + display: inline-block; + zoom: 1; + text-align: center; +} + +div.selector select, +div.checker input, +div.button button, +div.button input, +div.button a, +div.radio input, +div.uploader input, +input.uniform-input, +select.uniform-multiselect, +textarea.uniform { + outline: 0; +} + +div.selector, +div.selector *, +div.radio, +div.radio *, +div.checker, +div.checker *, +div.uploader, +div.uploader *, +div.button, +div.button * { + margin: 0; + padding: 0; +} + +/* Select */ +div.selector { + padding: 0 1.9em 0 0; + position: relative; + overflow: hidden; + border: 1px solid; + border-radius: 4px; +} +div.selector span { + text-overflow: ellipsis; + display: block; + overflow: hidden; + white-space: nowrap; + padding:6px 0 6px 10px; + cursor: pointer; + width: 100%; + border-right: 1px solid; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +div.selector .ui-icon { + background: url(img/ui-icons_white.png) -65px -16px; +} +div.selector select { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + position: absolute; + height: 50px; + bottom: 0; + width: 100%; + cursor: pointer; +} + +/* Checkbox */ +div.checker { + position: relative; + border: 1px solid; + padding: 1px; + border-radius: 4px; +} +div.checker, +div.checker span, +div.checker input { + width: 15px; + height: 15px; +} +div.checker span.checked { + background: url(img/ui-icons_white.png) -64px -145px; +} +div.checker input { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + cursor: pointer; +} + +/* Radio */ +div.radio { + position: relative; + border: 1px solid; + padding: 1px; + border-radius: 9px; +} +div.radio, +div.radio span, +div.radio input { + width: 15px; + height: 15px; +} +div.radio span.checked { + background: url(img/ui-icons_white.png) -80px -145px; +} +div.radio input { + opacity: 0; + border: 0; + background: none; + cursor: pointer; +} + +/* Upload */ +div.uploader { + cursor: pointer; + position: relative; + overflow: hidden; + border-radius: 4px; +} +div.uploader span.action { + text-align: center; + float: left; + display: inline; + overflow: hidden; + cursor: pointer; + padding: 6px 10px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +div.uploader span.filename { + text-overflow: ellipsis; + display: block; + overflow: hidden; + white-space: nowrap; + float: left; + padding: 6px 10px; + border-right: 1px solid; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +div.uploader input { + opacity: 0; + filter: alpha(opacity=0); + border: 0; + background: none; + position: absolute; + top: 0; + right: 0; + float: right; + cursor: pointer; + font-size: 100px; +} +div.uploader input::-webkit-file-upload-button { + cursor: pointer; +} +div.uploader.active span.filename, +div.uploader.focus span.filename { + border-right: 1px solid; +} + +/* Button */ +div.button { + cursor: pointer; + position: relative; + overflow: hidden; + border: 1px solid; + border-radius: 4px; +} +div.button a, +div.button button, +div.button input { + opacity: 0; + filter: alpha(opacity=0); + display: block; + left: 0; + top: 0; + position: absolute; + margin: 0; + padding: 0; + font-size: 1000px; + cursor: pointer; +} +div.button span { + padding: 0; + margin: 6px 10px; +} + +/* Text fields */ +input.uniform-input, +select.uniform-multiselect, +textarea.uniform { + margin: 0; + border: 1px solid; + border-radius: 4px; +} +input.uniform-input, +textarea.uniform { + padding: 6px 10px; +} +textarea.uniform { + overflow: auto; +} +select.uniform-multiselect { + padding: 5px; +} + + +/** Colorize elements */ + +div.uploader { + border: 1px solid #6b6b6b; +} +div.uploader.active, +div.uploader.focus { + border-color: #1b79b8; +} + +/* Default - text fields */ +input.uniform-input, +select.uniform-multiselect, +textarea.uniform, +div.uploader span.filename, +div.selector span { + border-color: #6b6b6b; + box-shadow: inset 0 0 4px #6b6b6b; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); + color: #6b6b6b; +} + +select.uniform-multiselect option { + color: #6b6b6b; +} + +select.uniform-multiselect.focus option { + color: #000; +} + +/* Focus - text fields */ +input.uniform-input.focus, +select.uniform-multiselect.focus, +textarea.uniform.focus, +div.uploader.active span.filename, +div.uploader.focus span.filename, +div.selector.active span, +div.selector.focus span { + border-color: #1b79b8; + box-shadow: inset 0 0 4px #1b79b8; + color: #000; + background: #fff; + background: -webkit-linear-gradient(top, #dfeef8, #fff); + background: -moz-linear-gradient(top, #dfeef8, #fff); + background: -ms-linear-gradient(top, #dfeef8, #fff); + background: -o-linear-gradient(top, #dfeef8, #fff); + background: linear-gradient(to bottom, #dfeef8, #fff); +} + +/* Read-only - text fields */ +input.uniform-input[readonly], +textarea.uniform[readonly], +input.uniform-input[readonly]:focus, +textarea.uniform[readonly]:focus { + color: #808080; + border-color: #a5a5a5; + box-shadow: inset 0 0 4px #a5a5a5; + background: -webkit-linear-gradient(top, #ddd, #fff); + background: -moz-linear-gradient(top, #ddd, #fff); + background: -ms-linear-gradient(top, #ddd, #fff); + background: -o-linear-gradient(top, #ddd, #fff); + background: linear-gradient(to bottom, #ddd, #fff); +} + +/* Default - buttons */ +div.selector, +div.button, +div.uploader span.action, +div.radio, +div.checker { + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #ababab, #6b6b6b); + background: -moz-linear-gradient(top, #ababab, #6b6b6b); + background: -ms-linear-gradient(top, #ababab, #6b6b6b); + background: -o-linear-gradient(top, #ababab, #6b6b6b); + background: linear-gradient(to bottom, #ababab, #6b6b6b); + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} + +/* Hover - buttons */ +div.selector.hover, +div.button.hover, +div.uploader.hover span.action, +div.radio.hover, +div.checker.hover { + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #6b6b6b, #ababab); + background: -moz-linear-gradient(top, #6b6b6b, #ababab); + background: -ms-linear-gradient(top, #6b6b6b, #ababab); + background: -o-linear-gradient(top, #6b6b6b, #ababab); + background: linear-gradient(to bottom, #6b6b6b, #ababab); +} + +/* Focus - buttons */ +div.selector.focus, +div.button.focus, +div.uploader.focus span.action, +div.radio.focus, +div.checker.focus { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #59b5f2, #1b79b8); + background: -moz-linear-gradient(top, #59b5f2, #1b79b8); + background: -ms-linear-gradient(top, #59b5f2, #1b79b8); + background: -o-linear-gradient(top, #59b5f2, #1b79b8); + background: linear-gradient(to bottom, #59b5f2, #1b79b8); +} + +/* Active - buttons */ +div.button.active, +div.button.active.hover, +div.button.focus.hover, +div.uploader.active span.action, +div.uploader.active.hover span.action, +div.uploader.focus.hover span.action, +div.radio.active, +div.radio.active.hover, +div.radio.focus.hover, +div.checker.active, +div.checker.active.hover, +div.checker.focus.hover, +div.selector.active, +div.selector.active.hover { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); + background: -moz-linear-gradient(top, #1b79b8, #59b5f2); + background: -ms-linear-gradient(top, #1b79b8, #59b5f2); + background: -o-linear-gradient(top, #1b79b8, #59b5f2); + background: linear-gradient(to bottom, #1b79b8, #59b5f2); +} + +/* Disabled */ +input.uniform-input[disabled], +select.uniform-multiselect[disabled], +textarea.uniform[disabled], +div.button.disabled, +div.uploader.disabled, +div.radio.disabled, +div.checker.disabled, +div.selector.disabled, +div.selector.disabled.active{ + opacity: .5; + filter: alpha(opacity=50); + cursor: default; +} + +div.selector.disabled select, +div.uploader.disabled input, +div.button.disabled input, +div.button.disabled button, +div.button.disabled a, +div.radio.disabled input, +div.checker.disabled input { + cursor: default; +} + +/* Buttons text */ +div.button span, +div.uploader span.action { + font-weight: bold; + color: #fff; + text-shadow: + 1px 0 rgba(0,0,0,.2), + -1px 0 rgba(0,0,0,.2), + 0 -1px rgba(0,0,0,.2), + 0 1px rgba(0,0,0,.2), + 1px 1px rgba(0,0,0,.2), + -1px -1px rgba(0,0,0,.2), + 1px -1px rgba(0,0,0,.2), + -1px 1px rgba(0,0,0,.2); +} + +/* Placeholder colors */ +input.uniform-input::-webkit-input-placeholder, +textarea.uniform::-webkit-input-placeholder { + color: #ababab; +} +input.uniform-input:-moz-placeholder, +textarea.uniform::-moz-placeholder { + color: #6b6b6b; +} +input.uniform-input::-moz-placeholder, +textarea.uniform::-moz-placeholder { + color: #6b6b6b; +} +input.uniform-input:-ms-input-placeholder, +textarea.uniform:-ms-input-placeholder{ + color: #ababab; +} +input.uniform-input:focus::-webkit-input-placeholder, +textarea.uniform:focus::-webkit-input-placeholder{ + color: #59b5f2; +} +input.uniform-input:focus:-moz-placeholder, +textarea.uniform:focus:-moz-placeholder { + color: #1b79b8; +} +input.uniform-input:focus::-moz-placeholder, +textarea.uniform:focus::-moz-placeholder { + color: #1b79b8; +} +input.uniform-input:focus:-ms-input-placeholder, +textarea.uniform:focus:-ms-input-placeholder { + color: #59b5f2; +} + +/** sh-uniform elements (a shUniform patch must be applied) */ + +fieldset.sh-uniform { + border: 1px solid #6B6B6B; + box-shadow: inset 0 0 4px #6B6B6B; + border-radius: 4px; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); + margin: 0 10px 10px 0; + padding: 10px; +} +fieldset.sh-uniform legend { + font-weight: bold; + color: #6B6B6B; + text-shadow: + 1px 0 rgba(255,255,255,.5), + -1px 0 rgba(255,255,255,.5), + 0 -1px rgba(255,255,255,.5), + 0 1px rgba(255,255,255,.5), + 1px 1px rgba(255,255,255,.5), + -1px -1px rgba(255,255,255,.5), + 1px -1px rgba(255,255,255,.5), + -1px 1px rgba(255,255,255,.5), + 0 0 5px #fff; +} +label.sh-uniform { + color: #6b6b6b; +} + +/*** shCheckset */ + +.shcs { + margin: 0; +} +.shcs > div { + border: 1px solid; + border-top: 0; + padding: 5px; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; +} +.shcs > input, .shcs > input:focus, .shcs > input:hover { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + margin:0; +} +.shcs label { + padding: 2px 5px 2px 2px; + border: 1px solid transparent; + border-radius: 4px; + color: #6b6b6b; +} +.shcs > div, .shcs label:hover { + border-color: #6b6b6b; + box-shadow: inset 0 0 4px #6b6b6b; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); +} +.shcs label:hover { + color: #6b6b6b; + cursor: pointer; +} +.shcs > div.focus, .shcs label.checked { + border-color: #1b79b8; + box-shadow: inset 0 0 4px #1b79b8; + color: #000; + background: #fff; + background: -webkit-linear-gradient(top, #dfeef8, #fff); + background: -moz-linear-gradient(top, #dfeef8, #fff); + background: -ms-linear-gradient(top, #dfeef8, #fff); + background: -o-linear-gradient(top, #dfeef8, #fff); + background: linear-gradient(to bottom, #dfeef8, #fff); +} +.shcs label.checked div.checker { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #59b5f2, #1b79b8); + background: -moz-linear-gradient(top, #59b5f2, #1b79b8); + background: -ms-linear-gradient(top, #59b5f2, #1b79b8); + background: -o-linear-gradient(top, #59b5f2, #1b79b8); + background: linear-gradient(to bottom, #59b5f2, #1b79b8); +} +.shcs label.checked div.checker.hover { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); + background: -moz-linear-gradient(top, #1b79b8, #59b5f2); + background: -ms-linear-gradient(top, #1b79b8, #59b5f2); + background: -o-linear-gradient(top, #1b79b8, #59b5f2); + background: linear-gradient(to bottom, #1b79b8, #59b5f2); +} + +.shcs div.checker.focus { + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #ababab, #6b6b6b); + background: -moz-linear-gradient(top, #ababab, #6b6b6b); + background: -ms-linear-gradient(top, #ababab, #6b6b6b); + background: -o-linear-gradient(top, #ababab, #6b6b6b); + background: linear-gradient(to bottom, #ababab, #6b6b6b); + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} + +.shcs div.checker.focus.hover { + border-color: #6b6b6b; + background: #6b6b6b; + background: -webkit-linear-gradient(top, #6b6b6b, #ababab); + background: -moz-linear-gradient(top, #6b6b6b, #ababab); + background: -ms-linear-gradient(top, #6b6b6b, #ababab); + background: -o-linear-gradient(top, #6b6b6b, #ababab); + background: linear-gradient(to bottom, #6b6b6b, #ababab); +} + +.shcs label > span { + position:relative; + margin-left:5px; + top:1px; +}* { + font-size: 13px; +} +body { + background: #e0e0e0; + color: #6B6B6B; +} +fieldset td { + white-space: nowrap; +} +#folders { + margin: 5px 5px 0 5px; +} +#files { + margin-right: 5px; +} + + +/* SHARED DECLARATIONS */ + +#toolbar a:hover, +#toolbar a.hover, +span.current, +span.regular:hover, +span.context, +#clipboard div:hover, +div.file:hover, +#files div.selected, +#files div.selected:hover, +tr.selected > td, +tr.selected:hover > td, +#menu .list div a:hover { + color: #fff; + text-shadow: + 1px 0 rgba(0,0,0,.2), + -1px 0 rgba(0,0,0,.2), + 0 -1px rgba(0,0,0,.2), + 0 1px rgba(0,0,0,.2), + 1px 1px rgba(0,0,0,.2), + -1px -1px rgba(0,0,0,.2), + 1px -1px rgba(0,0,0,.2), + -1px 1px rgba(0,0,0,.2); +} + +#files, +#folders, +#toolbar a.selected { + border: 1px solid #6B6B6B; + box-shadow: inset 0 0 4px #6B6B6B; + border-radius: 4px; + background: #fff; + background: -webkit-linear-gradient(top, #f0f0f0, #fff); + background: -moz-linear-gradient(top, #f0f0f0, #fff); + background: -ms-linear-gradient(top, #f0f0f0, #fff); + background: -o-linear-gradient(top, #f0f0f0, #fff); + background: linear-gradient(to bottom, #f0f0f0, #fff); +} + +/* TOOLBAR */ + +#toolbar { + padding: 5px 0; +} +#toolbar a { + color: #6b6b6b; + margin-right: 5px; + border: 1px solid transparent; + outline: none; + display: block; + float: left; + border-radius: 4px; + transition: .3s; + padding:0; + background: #E0E0E0; +} +#toolbar a > span { + padding: 6px 10px 6px 26px; + diaplay: block; + float:left; + background: no-repeat 6px center; +} +#toolbar a:hover, +#toolbar a.hover { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #59b5f2, #1b79b8); + background: -moz-linear-gradient(top, #59b5f2, #1b79b8); + background: -ms-linear-gradient(top, #59b5f2, #1b79b8); + background: -o-linear-gradient(top, #59b5f2, #1b79b8); + background: linear-gradient(to bottom, #59b5f2, #1b79b8); + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} +#toolbar a:hover, +#toolbar a.hover { + transition: .3s; +} +#toolbar a[href="kcact:upload"] span { + background-image: url(img/icons/upload.png); +} +#toolbar a[href="kcact:refresh"] span { + background-image: url(img/icons/refresh.png); +} +#toolbar a[href="kcact:settings"] span { + background-image: url(img/icons/settings.png); +} +#toolbar a[href="kcact:about"] span { + background-image: url(img/icons/about.png); +} +#toolbar a[href="kcact:maximize"] span { + background-image: url(img/icons/maximize.png); +} + + +/* SETTINGS BAR */ + +#settings label { + cursor: pointer; +} +#settings fieldset { + margin-right:5px; + margin-bottom: 6px; + margin-top:-5px; + padding:6px; +} +#settings fieldset:hover { + border-color: #1b79b8; + box-shadow: inset 0 0 4px #1b79b8; + background: #dfeef8; + background: -webkit-linear-gradient(top, #dfeef8, #fff); + background: -moz-linear-gradient(top, #dfeef8, #fff); + background: -ms-linear-gradient(top, #dfeef8, #fff); + background: -o-linear-gradient(top, #dfeef8, #fff); + background: linear-gradient(to bottom, #dfeef8, #fff); +} +#settings fieldset:hover legend, +#settings fieldset:hover label { + color: #215b82; +} + + +/* FOLDERS */ + +div.folder { + padding-top: 2px; + margin-top: 4px; + white-space: nowrap; +} +div.folder a { + text-decoration: none; + cursor: default; + outline: none; + color: #6b6b6b; +} +span.folder { + padding: 2px 3px 2px 23px; + outline: none; + background: no-repeat 3px center; + cursor: pointer; + border-radius: 3px; + border: 1px solid transparent; +} +span.brace { + width: 16px; + height: 16px; + outline: none; +} +span.current { + transition: .3s; + background-image: url(img/tree/folder.png); + background-color: #3b98d6; + border-color: #3b98d6; + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} +span.regular { + transition: .3s; + background-image: url(img/tree/folder.png); + background-color: transparent; +} +span.regular:hover, span.context, #clipboard div:hover { + transition: .3s; + background-color: #c6c6c6; + border-color: #c6c6c6; + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} +span.opened { + background-image: url(img/tree/minus.png); +} +span.closed { + background-image: url(img/tree/plus.png); +} +span.denied { + background-image: url(img/tree/denied.png); +} + + +/* FILES */ + +div.file { + padding: 4px; + margin: 3px; + border: 1px solid transparent; + border-radius: 4px; +} +div.file:hover { + border-color: #aaa; + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; + background: #c6c6c6; + background: -webkit-linear-gradient(top, #e7e7e7, #c6c6c6); + background: -moz-linear-gradient(top, #e7e7e7, #c6c6c6); + background: -ms-linear-gradient(top, #e7e7e7, #c6c6c6); + background: -o-linear-gradient(top, #e7e7e7, #c6c6c6); + background: linear-gradient(to bottom, #e7e7e7, #c6c6c6); +} +div.file .name { + margin-top: 4px; + font-weight: bold; + height: 16px; + overflow: hidden; + padding-bottom: 2px; +} +div.file .time { + font-size: 10px; +} +div.file .size { + font-size: 10px; +} +#files div.selected, +#files div.selected:hover { + border-color: #3b98d6; + background: #3b98d6; + background: -webkit-linear-gradient(top, #7dc2f2, #3b98d6); + background: -moz-linear-gradient(top, #7dc2f2, #3b98d6); + background: -ms-linear-gradient(top, #7dc2f2, #3b98d6); + background: -o-linear-gradient(top, #7dc2f2, #3b98d6); + background: linear-gradient(to bottom, #7dc2f2, #3b98d6); + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} +tr.file > td { + padding: 3px 4px; +} +tr.file:hover > td { + background-color: #ddebf8; + transition: none; +} +tr.selected > td, +tr.selected:hover > td { + transition: .3s; + background-color: #5b9bda; +} +tr.file td.name { + background-position: 2px center; + padding-left: 22px; +} +a.denied { + color: #666; + opacity: 0.5; + filter: alpha(opacity:50); + cursor: default; +} +a.denied:hover { + background-color: #e4e3e2; + border-color: transparent; + box-shadow: none; +} + +/* FILE MENU */ + +#menu .ui-menu a span { + background: left center no-repeat; + padding-left: 20px; + white-space: nowrap; +} +#menu a[href="kcact:refresh"] span { + background-image: url(img/icons/refresh.png); +} +#menu a[href="kcact:mkdir"] span { + background-image: url(img/icons/folder-new.png); +} +#menu a[href="kcact:mvdir"] span, #menu a[href="kcact:mv"] span { + background-image: url(img/icons/rename.png); +} +#menu a[href="kcact:rmdir"] span, #menu a[href="kcact:rm"] span, #menu a[href="kcact:rmcbd"] span { + background-image: url(img/icons/delete.png); +} +#menu a[href="kcact:clpbrdadd"] span { + background-image: url(img/icons/clipboard-add.png); +} +#menu a[href="kcact:pick"] span, #menu a[href="kcact:pick_thumb"] span { + background-image: url(img/icons/select.png); +} +#menu a[href="kcact:download"] span { + background-image: url(img/icons/download.png); +} +#menu a[href="kcact:view"] span { + background-image: url(img/icons/view.png); +} +#menu a[href="kcact:cpcbd"] span { + background-image: url(img/icons/copy.png); +} +#menu a[href="kcact:mvcbd"] span { + background-image: url(img/icons/move.png); +} +#menu a[href="kcact:clrcbd"] span { + background-image: url(img/icons/clipboard-clear.png); +} + +/* CLIPBOARD */ + +#clipboard { + margin-left:-3px; + padding: 2px; +} +#clipboard div { + background: url(img/icons/clipboard.png) no-repeat center center; + border: 1px solid transparent; + padding: 2px; + cursor: pointer; + border-radius: 4px; +} +#clipboard.selected div, #clipboard.selected div:hover { + background-color: #3b98d6; + border-color: #3b98d6; + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} +#menu .list a, #menu .list a.ui-state-focus { + margin: -1px 0 0 -1px; + padding: 6px 10px; + border: 1px solid transparent; + background: none; + border-radius: 0; + text-shadow: none; + box-shadow: none; + color: #6b6b6b; +} +#menu .list a.first, #menu .list a.first.ui-state-focus { + border-radius: 4px 4px 0 0; +} +#menu .list a:hover { + border-color: #1b79b8; + background: #1b79b8; + background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); + background: -moz-linear-gradient(top, #1b79b8, #59b5f2); + background: -ms-linear-gradient(top, #1b79b8, #59b5f2); + background: -o-linear-gradient(top, #1b79b8, #59b5f2); + background: linear-gradient(to bottom, #1b79b8, #59b5f2); + box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; +} +#menu .list { + overflow:hidden; + max-height: 1px; + margin-bottom: -1px; + padding-bottom:1px; +} +#menu li.div-files { + margin: 0 0 1px 0; +} + +/* ABOUT DIALOG */ + +.about { + text-align: center; +} +.about div.head { + font-weight: bold; + font-size: 12px; + padding: 3px 0 8px 0; +} +.about div.head a { + background: url(img/kcf_logo.png) no-repeat left center; + padding: 0 0 0 27px; + font-size: 17px; + outline: none; +} + +.about a { + text-decoration: none; + color: #0055ff; +} + +.about a:hover { + text-decoration: underline; +} +#checkver { + margin: 5px 0 10px 0; +} +#loading, #checkver > span.loading { + background: url(img/loading.gif); + border: 1px solid #3687e2; + box-shadow: 0 0 3px #3687e2, inset 0 0 4px #fff, inset 0 0 5px #fff; + padding: 6px 10px; + border-radius: 4px; +} +#checkver a { + font-weight: normal; + padding: 3px 3px 3px 20px; + background: url(img/icons/download.png) no-repeat left center; +} + +/* IMAGE VIEWER */ + +.ui-dialog-content.kcfImageViewer { + background: #000; + cursor: pointer; +} +.kcfImageViewer .img { + background: url(img/bg_transparent.png); +} + +/* MISC */ + +#loading { + margin-right: 5px; +} +#loadingDirs { + padding: 5px 0 1px 24px; +} +#files.drag { + background: #ddebf8; +} + +/* FIX FIELDSET BORDER RADIUS BUG ON IE */ +body.msie fieldset, +body.trident.rv fieldset { + border-radius: 0; +} \ No newline at end of file diff --git a/third_party/kcfinder/cache/theme_default.js b/third_party/kcfinder/cache/theme_default.js new file mode 100644 index 00000000000..518f854115b --- /dev/null +++ b/third_party/kcfinder/cache/theme_default.js @@ -0,0 +1 @@ +new Image().src = 'themes/default/img/loading.gif'; // preload animated gif diff --git a/tmp/runtime/URI/4.6.0,0962962aa5b15c247bce765d59cd78344a488eaf,1.ser b/tmp/runtime/URI/4.6.0,0962962aa5b15c247bce765d59cd78344a488eaf,1.ser new file mode 100644 index 0000000000000000000000000000000000000000..f6d3e812b706751db73261e535cbc8e9e3632a7d GIT binary patch literal 516 zcmZvYK~BRk5Jh{IS+Yt}Krr4Rgjxw&L}48{?YOb(CXww3N|n1ab|OkkcJ}Cd-t%8# zc8f53e|dgwtyY?B{_!?{B&93ubzK48;nCqWfHw6XBF52$QRc(#Df@AS7lX zn{r}SJO5zhdS|rrAeJ~Cp*+Qh`FWO6J+G4c$QxP5j4Yyy6GCEw$1a*S3aRa z#S<7y6` literal 0 HcmV?d00001 From d63b35718541db726a1d5d489fdbd1426b04a48f Mon Sep 17 00:00:00 2001 From: LouisGac Date: Wed, 27 Apr 2016 16:05:49 +0200 Subject: [PATCH 060/133] Dev: removed tmp files --- third_party/kcfinder/cache/base.css | 207 - third_party/kcfinder/cache/base.js | 4537 ----------------- third_party/kcfinder/cache/theme_default.css | 2440 --------- third_party/kcfinder/cache/theme_default.js | 1 - ...962aa5b15c247bce765d59cd78344a488eaf,1.ser | Bin 516 -> 0 bytes 5 files changed, 7185 deletions(-) delete mode 100644 third_party/kcfinder/cache/base.css delete mode 100644 third_party/kcfinder/cache/base.js delete mode 100644 third_party/kcfinder/cache/theme_default.css delete mode 100644 third_party/kcfinder/cache/theme_default.js delete mode 100644 tmp/runtime/URI/4.6.0,0962962aa5b15c247bce765d59cd78344a488eaf,1.ser diff --git a/third_party/kcfinder/cache/base.css b/third_party/kcfinder/cache/base.css deleted file mode 100644 index fac479468a0..00000000000 --- a/third_party/kcfinder/cache/base.css +++ /dev/null @@ -1,207 +0,0 @@ -html, body { - overflow: hidden; -} - -body, form, th, td { - margin: 0; - padding: 0; -} - -a { - cursor: pointer; -} - -* { - font-family: Tahoma, Verdana, Arial, sans-serif; - font-size: 11px; -} - -table { - border-collapse: collapse; -} - -#left { - float: left; - display: block; - width: 25%; -} - -#right { - float: left; - display: block; - width: 75%; -} - -#settings { - display: none; - padding: 0; - float: left; - width: 100%; -} - -#settings > div { - float: left; -} - -#folders { - padding: 5px; - overflow: auto; -} - -#toolbar { - padding: 5px; -} - -#files { - padding: 5px; - overflow: auto; -} - -#status { - padding: 5px; - float: left; - overflow: hidden; -} - -#fileinfo { - float: left; -} - -#clipboard div { - width: 16px; - height: 16px; -} - -.folders { - margin-left: 16px; -} - -div.file { - overflow-x: hidden; - float: left; - text-align: center; - cursor: default; - white-space: nowrap; -} - -div.file .thumb { - background: no-repeat center center; -} - -#files table { - width: 100%; -} - -tr.file { - cursor: default; -} - -tr.file > td { - white-space: nowrap; -} - -tr.file > td.name { - background-repeat: no-repeat; - background-position: left center; - padding-left: 20px; - width: 100%; -} - -tr.file > td.time, -tr.file > td.size { - text-align: right; -} - -#toolbar { - cursor: default; - white-space: nowrap; -} - -#toolbar a { - padding-left: 20px; - text-decoration: none; - background: no-repeat left center; -} - -#toolbar a:hover, a[href="#upload"].uploadHover { - color: #000; -} - -#upload { - position: absolute; - overflow: hidden; - opacity: 0; - filter: alpha(opacity=0); -} -#upload input, #upload input::-webkit-file-upload-button { - cursor: pointer; -} - -span.brace { - padding-left: 11px; - cursor: default; -} - -span.brace.opened, span.brace.closed { - cursor: pointer; -} - -#menu, #clipboard { - position: absolute; - display: none; - z-index: 101; - cursor: default; -} - -#menu .box, #alert { - max-width: 350px; -} - -#clipboard { - z-index: 99; -} - -#loading { - display: none; - float: right; -} - -.menu { - background: #888; - white-space: nowrap; -} - -.menu a { - display: block; -} - -.menu .list { - max-height: 0; - overflow-y: auto; - overflow-x: hidden; - white-space: nowrap; -} - -#uploadResponse, -.file .access, -.file .hasThumb { - display: none; -} - -#resizer { - position: absolute; - z-index: 98; - top: 0; - background: #000; - opacity: 0; - filter: alpha(opacity=0); -}body.mobile { - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; -} - -body.firefox #files > div { - overflow: auto; - margin-bottom: 5px; -} \ No newline at end of file diff --git a/third_party/kcfinder/cache/base.js b/third_party/kcfinder/cache/base.js deleted file mode 100644 index d67fea3bef4..00000000000 --- a/third_party/kcfinder/cache/base.js +++ /dev/null @@ -1,4537 +0,0 @@ -/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="
      ",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f -}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="
      a",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/\s*$/g,sb={option:[1,""],legend:[1,"
      ","
      "],area:[1,"",""],param:[1,"",""],thead:[1,"","
      "],tr:[2,"","
      "],col:[2,"","
      "],td:[3,"","
      "],_default:l.htmlSerialize?[0,"",""]:[1,"X
      ","
      "]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?""!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("').prependTo(document.body); - $('#loading').html(_.label("Uploading file...")).show(); - form.submit(); - $('#uploadResponse').load(function() { - var response = $(this).contents().find('body').text(); - $('#loading').hide(); - response = response.split("\n"); - - var selected = [], errors = []; - $.each(response, function(i, row) { - if (row.substr(0, 1) == "/") - selected[selected.length] = row.substr(1, row.length - 1); - else - errors[errors.length] = row; - }); - if (errors.length) { - errors = errors.join("\n"); - if (errors.replace(/^\s+/g, "").replace(/\s+$/g, "").length) - _.alert(errors); - } - if (!selected.length) - selected = null; - _.refresh(selected); - $('#upload').detach(); - setTimeout(function() { - $('#uploadResponse').detach(); - }, 1); - _.initUploadButton(); - }); -}; - -_.maximize = function(button) { - - // TINYMCE 3 - if (_.opener.name == "tinymce") { - - var par = window.parent.document, - ifr = $('iframe[src*="browse.php?opener=tinymce&"]', par), - id = parseInt(ifr.attr('id').replace(/^mce_(\d+)_ifr$/, "$1")), - win = $('#mce_' + id, par); - - if ($(button).hasClass('selected')) { - $(button).removeClass('selected'); - win.css({ - left: _.maximizeMCE.left, - top: _.maximizeMCE.top, - width: _.maximizeMCE.width, - height: _.maximizeMCE.height - }); - ifr.css({ - width: _.maximizeMCE.width - _.maximizeMCE.Hspace, - height: _.maximizeMCE.height - _.maximizeMCE.Vspace - }); - - } else { - $(button).addClass('selected') - _.maximizeMCE = { - width: parseInt(win.css('width')), - height: parseInt(win.css('height')), - left: win.position().left, - top: win.position().top, - Hspace: parseInt(win.css('width')) - parseInt(ifr.css('width')), - Vspace: parseInt(win.css('height')) - parseInt(ifr.css('height')) - }; - var width = $(window.top).width(), - height = $(window.top).height(); - win.css({ - left: $(window.parent).scrollLeft(), - top: $(window.parent).scrollTop(), - width: width, - height: height - }); - ifr.css({ - width: width - _.maximizeMCE.Hspace, - height: height - _.maximizeMCE.Vspace - }); - } - - // TINYMCE 4 - } else if (_.opener.name == "tinymce4") { - - var par = window.parent.document, - ifr = $('iframe[src*="browse.php?opener=tinymce4&"]', par).parent(), - win = ifr.parent(); - - if ($(button).hasClass('selected')) { - $(button).removeClass('selected'); - - win.css({ - left: _.maximizeMCE4.left, - top: _.maximizeMCE4.top, - width: _.maximizeMCE4.width, - height: _.maximizeMCE4.height - }); - - ifr.css({ - width: _.maximizeMCE4.width, - height: _.maximizeMCE4.height - _.maximizeMCE4.Vspace - }); - - } else { - $(button).addClass('selected'); - - _.maximizeMCE4 = { - width: parseInt(win.css('width')), - height: parseInt(win.css('height')), - left: win.position().left, - top: win.position().top, - Vspace: win.outerHeight(true) - ifr.outerHeight(true) - 1 - }; - - var width = $(window.top).width(), - height = $(window.top).height(); - - win.css({ - left: 0, - top: 0, - width: width, - height: height - }); - - ifr.css({ - width: width, - height: height - _.maximizeMCE4.Vspace - }); - } - - // PUPUP WINDOW - } else if (window.opener) { - window.moveTo(0, 0); - width = screen.availWidth; - height = screen.availHeight; - if ($.agent.opera) - height -= 50; - window.resizeTo(width, height); - - } else { - if (window.parent) { - var el = null; - $(window.parent.document).find('iframe').each(function() { - if (this.src.replace('/?', '?') == window.location.href.replace('/?', '?')) { - el = this; - return false; - } - }); - - // IFRAME - if (el !== null) - $(el).toggleFullscreen(window.parent.document); - - // SELF WINDOW - else - $('body').toggleFullscreen(); - - } else - $('body').toggleFullscreen(); - } -}; - -_.refresh = function(selected) { - _.fadeFiles(); - $.ajax({ - type: "post", - dataType: "json", - url: _.getURL("chDir"), - data: {dir: _.dir}, - async: false, - success: function(data) { - if (_.check4errors(data)) { - $('#files > div').css({opacity: "", filter: ""}); - return; - } - _.dirWritable = data.dirWritable; - _.files = data.files ? data.files : []; - _.orderFiles(null, selected); - _.statusDir(); - }, - error: function() { - $('#files > div').css({opacity: "", filter: ""}); - $('#files').html(_.label("Unknown error.")); - } - }); -}; -/** This file is part of KCFinder project - * - * @desc Settings panel functionality - * @package KCFinder - * @version 3.12 - * @author Pavel Tzonkov - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - -_.initSettings = function() { - $('#settings').disableTextSelect(); - $('#settings fieldset, #settings input, #settings label').uniform(); - - if (!_.shows.length) - $('#show input[type="checkbox"]').each(function(i) { - _.shows[i] = this.name; - }); - - var shows = _.shows; - - if (!$.$.kuki.isSet('showname')) { - $.$.kuki.set('showname', "on"); - $.each(shows, function (i, val) { - if (val != "name") $.$.kuki.set('show' + val, "off"); - }); - } - - $('#show input[type="checkbox"]').click(function() { - $.$.kuki.set('show' + this.name, this.checked ? "on" : "off") - $('#files .file div.' + this.name).css('display', this.checked ? "block" : "none"); - }); - - $.each(shows, function(i, val) { - $('#show input[name="' + val + '"]').get(0).checked = ($.$.kuki.get('show' + val) == "on") ? "checked" : ""; - }); - - if (!_.orders.length) - $('#order input[type="radio"]').each(function(i) { - _.orders[i] = this.value; - }) - - var orders = _.orders; - - if (!$.$.kuki.isSet('order')) - $.$.kuki.set('order', "name"); - - if (!$.$.kuki.isSet('orderDesc')) - $.$.kuki.set('orderDesc', "off"); - - $('#order input[value="' + $.$.kuki.get('order') + '"]').get(0).checked = true; - $('#order input[name="desc"]').get(0).checked = ($.$.kuki.get('orderDesc') == "on"); - - $('#order input[type="radio"]').click(function() { - $.$.kuki.set('order', this.value); - _.orderFiles(); - }); - - $('#order input[name="desc"]').click(function() { - $.$.kuki.set('orderDesc', this.checked ? 'on' : "off"); - _.orderFiles(); - }); - - if (!$.$.kuki.isSet('view')) - $.$.kuki.set('view', "thumbs"); - - if ($.$.kuki.get('view') == "list") - $('#show').parent().hide(); - - $('#view input[value="' + $.$.kuki.get('view') + '"]').get(0).checked = true; - - $('#view input').click(function() { - var view = this.value; - if ($.$.kuki.get('view') != view) { - $.$.kuki.set('view', view); - if (view == "list") - $('#show').parent().hide(); - else - $('#show').parent().show(); - } - _.fixFilesHeight(); - _.refresh(); - }); -}; -/** This file is part of KCFinder project - * - * @desc File related functionality - * @package KCFinder - * @version 3.12 - * @author Pavel Tzonkov - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - -_.initFiles = function() { - $(document).unbind('keydown').keydown(function(e) { - return !_.selectAll(e); - }); - $('#files').unbind().scroll(function() { - _.menu.hide(); - }).disableTextSelect(); - - $('.file').unbind().click(function(e) { - _.selectFile($(this), e); - - }).rightClick(function(el, e) { - _.menuFile($(el), e); - }).dblclick(function() { - _.returnFile($(this)); - }); - - if ($.mobile) - $('.file').on('taphold', function() { - _.menuFile($(this), { - pageX: $(this).offset().left, - pageY: $(this).offset().top + $(this).outerHeight() - }); - }); - - $.each(_.shows, function(i, val) { - $('#files .file div.' + val).css('display', ($.$.kuki.get('show' + val) == "off") ? "none" : "block"); - }); - _.statusDir(); -}; - -_.showFiles = function(callBack, selected) { - _.fadeFiles(); - setTimeout(function() { - var c = $('
      '); - - $.each(_.files, function(i, file) { - var f, icon, - stamp = file.size + "|" + file.mtime; - - // List - if ($.$.kuki.get('view') == "list") { - if (!i) c.html('
      '); - - icon = $.$.getFileExtension(file.name); - if (file.thumb) - icon = ".image"; - else if (!icon.length || !file.smallIcon) - icon = "."; - icon = "themes/" + _.theme + "/img/files/small/" + icon + ".png"; - - f = $(''); - f.appendTo(c.find('table')); - - // Thumbnails - } else { - if (file.thumb) - icon = _.getURL('thumb') + "&file=" + encodeURIComponent(file.name) + "&dir=" + encodeURIComponent(_.dir) + "&stamp=" + stamp; - else if (file.smallThumb) { - icon = _.uploadURL + "/" + _.dir + "/" + encodeURIComponent(file.name); - icon = $.$.escapeDirs(icon).replace(/\'/g, "%27"); - } else { - icon = file.bigIcon ? $.$.getFileExtension(file.name) : "."; - if (!icon.length) icon = "."; - icon = "themes/" + _.theme + "/img/files/big/" + icon + ".png"; - } - f = $('
      '); - f.appendTo(c); - } - - f.find('.thumb').css({backgroundImage: 'url("' + icon + '")'}); - f.find('.name').html($.$.htmlData(file.name)); - f.find('.time').html(file.date); - f.find('.size').html(_.humanSize(file.size)); - f.data(file); - - if ((file.name === selected) || $.$.inArray(file.name, selected)) - f.addClass('selected'); - }); - - c.css({opacity:'', filter:''}); - $('#files').html(c); - - if (callBack) callBack(); - _.initFiles(); - }, 200); -}; - -_.selectFile = function(file, e) { - - // Click with Ctrl, Meta or Shift key - if (e.ctrlKey || e.metaKey || e.shiftKey) { - - // Click with Shift key - if (e.shiftKey && !file.hasClass('selected')) { - var f = file.prev(); - while (f.get(0) && !f.hasClass('selected')) { - f.addClass('selected'); - f = f.prev(); - } - } - - file.toggleClass('selected'); - - // Update statusbar - var files = $('.file.selected').get(), - size = 0, data; - if (!files.length) - _.statusDir(); - else { - $.each(files, function(i, cfile) { - size += $(cfile).data('size'); - }); - size = _.humanSize(size); - if (files.length > 1) - $('#fileinfo').html(files.length + " " + _.label("selected files") + " (" + size + ")"); - else { - data = $(files[0]).data(); - $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); - } - } - - // Normal click - } else { - data = file.data(); - $('.file').removeClass('selected'); - file.addClass('selected'); - $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); - } -}; - -_.selectAll = function(e) { - if ((!e.ctrlKey && !e.metaKey) || ((e.keyCode != 65) && (e.keyCode != 97))) // Ctrl-A - return false; - - var files = $('.file'), - size = 0; - - if (files.length) { - - files.addClass('selected').each(function() { - size += $(this).data('size'); - }); - - $('#fileinfo').html(files.length + " " + _.label("selected files") + " (" + _.humanSize(size) + ")"); - } - - return true; -}; - -_.returnFile = function(file) { - - var button, win, fileURL = file.substr - ? file : _.uploadURL + "/" + _.dir + "/" + file.data('name'); - fileURL = $.$.escapeDirs(fileURL); - - if (_.opener.name == "ckeditor") { - _.opener.CKEditor.object.tools.callFunction(_.opener.CKEditor.funcNum, fileURL, ""); - window.close(); - - } else if (_.opener.name == "fckeditor") { - window.opener.SetUrl(fileURL) ; - window.close() ; - - } else if (_.opener.name == "tinymce") { - win = tinyMCEPopup.getWindowArg('window'); - win.document.getElementById(tinyMCEPopup.getWindowArg('input')).value = fileURL; - if (win.getImageData) win.getImageData(); - if (typeof(win.ImageDialog) != "undefined") { - if (win.ImageDialog.getImageData) - win.ImageDialog.getImageData(); - if (win.ImageDialog.showPreviewImage) - win.ImageDialog.showPreviewImage(fileURL); - } - tinyMCEPopup.close(); - - } else if (_.opener.name == "tinymce4") { - win = (window.opener ? window.opener : window.parent); - $(win.document).find('#' + _.opener.TinyMCE.field).val(fileURL); - win.tinyMCE.activeEditor.windowManager.close(); - - } else if (_.opener.callBack) { - - if (window.opener && window.opener.KCFinder) { - _.opener.callBack(fileURL); - window.close(); - } - - if (window.parent && window.parent.KCFinder) { - button = $('#toolbar a[href="kcact:maximize"]'); - if (button.hasClass('selected')) - _.maximize(button); - _.opener.callBack(fileURL); - } - - } else if (_.opener.callBackMultiple) { - if (window.opener && window.opener.KCFinder) { - _.opener.callBackMultiple([fileURL]); - window.close(); - } - - if (window.parent && window.parent.KCFinder) { - button = $('#toolbar a[href="kcact:maximize"]'); - if (button.hasClass('selected')) - _.maximize(button); - _.opener.callBackMultiple([fileURL]); - } - - } -}; - -_.returnFiles = function(files) { - if (_.opener.callBackMultiple && files.length) { - var rfiles = []; - $.each(files, function(i, file) { - rfiles[i] = _.uploadURL + "/" + _.dir + "/" + $(file).data('name'); - rfiles[i] = $.$.escapeDirs(rfiles[i]); - }); - _.opener.callBackMultiple(rfiles); - if (window.opener) window.close() - } -}; - -_.returnThumbnails = function(files) { - if (_.opener.callBackMultiple) { - var rfiles = [], j = 0; - $.each(files, function(i, file) { - if ($(file).data('thumb')) { - rfiles[j] = _.thumbsURL + "/" + _.dir + "/" + $(file).data('name'); - rfiles[j] = $.$.escapeDirs(rfiles[j++]); - } - }); - _.opener.callBackMultiple(rfiles); - if (window.opener) window.close() - } -}; -/** This file is part of KCFinder project - * - * @desc Folder related functionality - * @package KCFinder - * @version 3.12 - * @author Pavel Tzonkov - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - -_.initFolders = function() { - $('#folders').scroll(function() { - _.menu.hide(); - }).disableTextSelect(); - $('div.folder > a').unbind().click(function() { - _.menu.hide(); - return false; - }); - $('div.folder > a > span.brace').unbind().click(function() { - if ($(this).hasClass('opened') || $(this).hasClass('closed')) - _.expandDir($(this).parent()); - }); - $('div.folder > a > span.folder').unbind().click(function() { - _.changeDir($(this).parent()); - }).rightClick(function(el, e) { - _.menuDir($(el).parent(), e); - }); - if ($.mobile) { - $('div.folder > a > span.folder').on('taphold', function() { - _.menuDir($(this).parent(), { - pageX: $(this).offset().left + 1, - pageY: $(this).offset().top + $(this).outerHeight() - }); - }); - } -}; - -_.setTreeData = function(data, path) { - if (!path) - path = ""; - else if (path.length && (path.substr(path.length - 1, 1) != '/')) - path += "/"; - path += data.name; - var selector = '#folders a[href="kcdir:/' + $.$.escapeDirs(path) + '"]'; - $(selector).data({ - name: data.name, - path: path, - readable: data.readable, - writable: data.writable, - removable: data.removable, - hasDirs: data.hasDirs - }); - $(selector + ' span.folder').addClass(data.current ? 'current' : 'regular'); - if (data.dirs && data.dirs.length) { - $(selector + ' span.brace').addClass('opened'); - $.each(data.dirs, function(i, cdir) { - _.setTreeData(cdir, path + "/"); - }); - } else if (data.hasDirs) - $(selector + ' span.brace').addClass('closed'); -}; - -_.buildTree = function(root, path) { - if (!path) path = ""; - path += root.name; - var cdir, html = '
       ' + $.$.htmlData(root.name) + ''; - if (root.dirs) { - html += '
      '; - for (var i = 0; i < root.dirs.length; i++) { - cdir = root.dirs[i]; - html += _.buildTree(cdir, path + "/"); - } - html += '
      '; - } - html += '
      '; - return html; -}; - -_.expandDir = function(dir) { - var path = dir.data('path'); - if (dir.children('.brace').hasClass('opened')) { - dir.parent().children('.folders').hide(500, function() { - if (path == _.dir.substr(0, path.length)) - _.changeDir(dir); - }); - dir.children('.brace').removeClass('opened').addClass('closed'); - } else { - if (dir.parent().children('.folders').get(0)) { - dir.parent().children('.folders').show(500); - dir.children('.brace').removeClass('closed').addClass('opened'); - } else if (!$('#loadingDirs').get(0)) { - dir.parent().append('
      ' + _.label("Loading folders...") + '
      '); - $('#loadingDirs').hide().show(200, function() { - $.ajax({ - type: "post", - dataType: "json", - url: _.getURL("expand"), - data: {dir: path}, - async: false, - success: function(data) { - $('#loadingDirs').hide(200, function() { - $('#loadingDirs').detach(); - }); - if (_.check4errors(data)) - return; - - var html = ""; - $.each(data.dirs, function(i, cdir) { - html += ''; - }); - if (html.length) { - dir.parent().append('
      ' + html + '
      '); - var folders = $(dir.parent().children('.folders').first()); - folders.hide(); - $(folders).show(500); - $.each(data.dirs, function(i, cdir) { - _.setTreeData(cdir, path); - }); - } - if (data.dirs.length) - dir.children('.brace').removeClass('closed').addClass('opened'); - else - dir.children('.brace').removeClass('opened closed'); - _.initFolders(); - _.initDropUpload(); - }, - error: function() { - $('#loadingDirs').detach(); - _.alert(_.label("Unknown error.")); - } - }); - }); - } - } -}; - -_.changeDir = function(dir) { - if (dir.children('span.folder').hasClass('regular')) { - $('div.folder > a > span.folder').removeClass('current regular').addClass('regular'); - dir.children('span.folder').removeClass('regular').addClass('current'); - $('#files').html(_.label("Loading files...")); - $.ajax({ - type: "post", - dataType: "json", - url: _.getURL("chDir"), - data: {dir: dir.data('path')}, - async: false, - success: function(data) { - if (_.check4errors(data)) - return; - _.files = data.files; - _.orderFiles(); - _.dir = dir.data('path'); - _.dirWritable = data.dirWritable; - _.setTitle("KCFinder: /" + _.dir); - _.statusDir(); - }, - error: function() { - $('#files').html(_.label("Unknown error.")); - } - }); - } -}; - -_.statusDir = function() { - var i = 0, size = 0; - for (; i < _.files.length; i++) - size += _.files[i].size; - size = _.humanSize(size); - $('#fileinfo').html(_.files.length + " " + _.label("files") + " (" + size + ")"); -}; - -_.refreshDir = function(dir) { - var path = dir.data('path'); - if (dir.children('.brace').hasClass('opened') || dir.children('.brace').hasClass('closed')) - dir.children('.brace').removeClass('opened').addClass('closed'); - dir.parent().children('.folders').first().detach(); - if (path == _.dir.substr(0, path.length)) - _.changeDir(dir); - _.expandDir(dir); - return true; -}; -/** This file is part of KCFinder project - * - * @desc Context menus - * @package KCFinder - * @version 3.12 - * @author Pavel Tzonkov - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - -_.menu = { - - init: function() { - $('#menu').html("
        ").css('display', 'none'); - }, - - addItem: function(href, label, callback, denied) { - if (typeof denied == "undefined") - denied = false; - - $('#menu ul').append('
      • ' + label + '
      • '); - - if (!denied && $.isFunction(callback)) - $('#menu a[href="' + href + '"]').click(function() { - _.menu.hide(); - return callback(); - }); - }, - - addDivider: function() { - if ($('#menu ul').html().length) - $('#menu ul').append("
      • -
      • "); - }, - - show: function(e) { - var dlg = $('#menu'), - ul = $('#menu ul'); - if (ul.html().length) { - dlg.find('ul').first().menu(); - if (typeof e != "undefined") { - var left = e.pageX, - top = e.pageY, - win = $(window); - - if ((dlg.outerWidth() + left) > win.width()) - left = win.width() - dlg.outerWidth(); - - if ((dlg.outerHeight() + top) > win.height()) - top = win.height() - dlg.outerHeight(); - - dlg.hide().css({ - left: left, - top: top, - width: "" - }).fadeIn('fast'); - } else - dlg.fadeIn('fast'); - } else - ul.detach(); - }, - - hide: function() { - $('#clipboard').removeClass('selected'); - $('div.folder > a > span.folder').removeClass('context'); - $('#menu').hide().css('width', "").html("").data('title', null).unbind().click(function() { - return false; - }); - $(document).unbind('keydown').keydown(function(e) { - return !_.selectAll(e); - }); - } -}; - -// FILE CONTEXT MENU -_.menuFile = function(file, e) { - _.menu.init(); - - var data = file.data(), - files = $('.file.selected').get(); - - // MULTIPLE FILES MENU - if (file.hasClass('selected') && files.length && (files.length > 1)) { - var thumb = false, - notWritable = 0, - cdata; - - $.each(files, function(i, cfile) { - cdata = $(cfile).data(); - if (cdata.thumb) thumb = true; - if (!data.writable) notWritable++; - }); - - if (_.opener.callBackMultiple) { - - // SELECT FILES - _.menu.addItem("kcact:pick", _.label("Select"), function() { - _.returnFiles(files); - return false; - }); - - // SELECT THUMBNAILS - if (thumb) - _.menu.addItem("kcact:pick_thumb", _.label("Select Thumbnails"), function() { - _.returnThumbnails(files); - return false; - }); - } - - if (data.thumb || data.smallThumb || _.support.zip) { - - _.menu.addDivider(); - - // VIEW IMAGE - if (data.thumb || data.smallThumb) - _.menu.addItem("kcact:view", _.label("View"), function() { - _.viewImage(data); - }); - - // DOWNLOAD - if (_.support.zip) - _.menu.addItem("kcact:download", _.label("Download"), function() { - var pfiles = []; - $.each(files, function(i, cfile) { - pfiles[i] = $(cfile).data('name'); - }); - _.post(_.getURL('downloadSelected'), {dir:_.dir, files:pfiles}); - return false; - }); - } - - // ADD TO CLIPBOARD - if (_.access.files.copy || _.access.files.move) { - _.menu.addDivider(); - _.menu.addItem("kcact:clpbrdadd", _.label("Add to Clipboard"), function() { - var msg = ''; - $.each(files, function(i, cfile) { - var cdata = $(cfile).data(), - failed = false; - for (i = 0; i < _.clipboard.length; i++) - if ((_.clipboard[i].name == cdata.name) && - (_.clipboard[i].dir == _.dir) - ) { - failed = true; - msg += cdata.name + ": " + _.label("This file is already added to the Clipboard.") + "\n"; - break; - } - - if (!failed) { - cdata.dir = _.dir; - _.clipboard[_.clipboard.length] = cdata; - } - }); - _.initClipboard(); - if (msg.length) _.alert(msg.substr(0, msg.length - 1)); - return false; - }); - } - - // DELETE - if (_.access.files['delete']) { - _.menu.addDivider(); - _.menu.addItem("kcact:rm", _.label("Delete"), function() { - if ($(this).hasClass('denied')) return false; - var failed = 0, - dfiles = []; - $.each(files, function(i, cfile) { - var cdata = $(cfile).data(); - if (!cdata.writable) - failed++; - else - dfiles[dfiles.length] = _.dir + "/" + cdata.name; - }); - if (failed == files.length) { - _.alert(_.label("The selected files are not removable.")); - return false; - } - - var go = function(callBack) { - _.fadeFiles(); - $.ajax({ - type: "post", - dataType: "json", - url: _.getURL("rm_cbd"), - data: {files:dfiles}, - async: false, - success: function(data) { - if (callBack) callBack(); - _.check4errors(data); - _.refresh(); - }, - error: function() { - if (callBack) callBack(); - $('#files > div').css({ - opacity: "", - filter: "" - }); - _.alert(_.label("Unknown error.")); - } - }); - }; - - if (failed) - _.confirm( - _.label("{count} selected files are not removable. Do you want to delete the rest?", {count:failed}), - go - ); - - else - _.confirm( - _.label("Are you sure you want to delete all selected files?"), - go - ); - - return false; - }, (notWritable == files.length)); - } - - _.menu.show(e); - - // SINGLE FILE MENU - } else { - $('.file').removeClass('selected'); - file.addClass('selected'); - $('#fileinfo').html($.$.htmlData(data.name) + " (" + _.humanSize(data.size) + ", " + data.date + ")"); - - if (_.opener.callBack || _.opener.callBackMultiple) { - - // SELECT FILE - _.menu.addItem("kcact:pick", _.label("Select"), function() { - _.returnFile(file); - return false; - }); - - // SELECT THUMBNAIL - if (data.thumb) - _.menu.addItem("kcact:pick_thumb", _.label("Select Thumbnail"), function() { - _.returnFile(_.thumbsURL + "/" + _.dir + "/" + data.name); - return false; - }); - - _.menu.addDivider(); - } - - // VIEW IMAGE - if (data.thumb || data.smallThumb) - _.menu.addItem("kcact:view", _.label("View"), function() { - _.viewImage(data); - }); - - // DOWNLOAD - _.menu.addItem("kcact:download", _.label("Download"), function() { - $('#menu').html('
        '); - $('#downloadForm input').get(0).value = _.dir; - $('#downloadForm input').get(1).value = data.name; - $('#downloadForm').submit(); - return false; - }); - - // ADD TO CLIPBOARD - if (_.access.files.copy || _.access.files.move) { - _.menu.addDivider(); - _.menu.addItem("kcact:clpbrdadd", _.label("Add to Clipboard"), function() { - for (i = 0; i < _.clipboard.length; i++) - if ((_.clipboard[i].name == data.name) && - (_.clipboard[i].dir == _.dir) - ) { - _.alert(_.label("This file is already added to the Clipboard.")); - return false; - } - var cdata = data; - cdata.dir = _.dir; - _.clipboard[_.clipboard.length] = cdata; - _.initClipboard(); - return false; - }); - } - - - if (_.access.files.rename || _.access.files['delete']) - _.menu.addDivider(); - - // RENAME - if (_.access.files.rename) - _.menu.addItem("kcact:mv", _.label("Rename..."), function() { - if (!data.writable) return false; - _.fileNameDialog( - {dir: _.dir, file: data.name}, - 'newName', data.name, _.getURL("rename"), { - title: "New file name:", - errEmpty: "Please enter new file name.", - errSlash: "Unallowable characters in file name.", - errDot: "File name shouldn't begins with '.'" - }, - _.refresh - ); - return false; - }, !data.writable); - - // DELETE - if (_.access.files['delete']) - _.menu.addItem("kcact:rm", _.label("Delete"), function() { - if (!data.writable) return false; - _.confirm(_.label("Are you sure you want to delete this file?"), - function(callBack) { - $.ajax({ - type: "post", - dataType: "json", - url: _.getURL("delete"), - data: {dir: _.dir, file: data.name}, - async: false, - success: function(data) { - if (callBack) callBack(); - _.clearClipboard(); - if (_.check4errors(data)) - return; - _.refresh(); - }, - error: function() { - if (callBack) callBack(); - _.alert(_.label("Unknown error.")); - } - }); - } - ); - return false; - }, !data.writable); - - _.menu.show(e); - } - -}; - -// FOLDER CONTEXT MENU -_.menuDir = function(dir, e) { - _.menu.init(); - - var data = dir.data(), - html = '
          '; - - if (_.clipboard && _.clipboard.length) { - - // COPY CLIPBOARD - if (_.access.files.copy) - _.menu.addItem("kcact:cpcbd", _.label("Copy {count} files", {count: _.clipboard.length}), function() { - _.copyClipboard(data.path); - return false; - }, !data.writable); - - // MOVE CLIPBOARD - if (_.access.files.move) - _.menu.addItem("kcact:mvcbd", _.label("Move {count} files", {count: _.clipboard.length}), function() { - _.moveClipboard(data.path); - return false; - }, !data.writable); - - if (_.access.files.copy || _.access.files.move) - _.menu.addDivider(); - } - - // REFRESH - _.menu.addItem("kcact:refresh", _.label("Refresh"), function() { - _.refreshDir(dir); - return false; - }); - - // DOWNLOAD - if (_.support.zip) { - _.menu.addDivider(); - _.menu.addItem("kcact:download", _.label("Download"), function() { - _.post(_.getURL("downloadDir"), {dir:data.path}); - return false; - }); - } - - if (_.access.dirs.create || _.access.dirs.rename || _.access.dirs['delete']) - _.menu.addDivider(); - - // NEW SUBFOLDER - if (_.access.dirs.create) - _.menu.addItem("kcact:mkdir", _.label("New Subfolder..."), function(e) { - if (!data.writable) return false; - _.fileNameDialog( - {dir: data.path}, - "newDir", "", _.getURL("newDir"), { - title: "New folder name:", - errEmpty: "Please enter new folder name.", - errSlash: "Unallowable characters in folder name.", - errDot: "Folder name shouldn't begins with '.'" - }, function() { - _.refreshDir(dir); - _.initDropUpload(); - if (!data.hasDirs) { - dir.data('hasDirs', true); - dir.children('span.brace').addClass('closed'); - } - } - ); - return false; - }, !data.writable); - - // RENAME - if (_.access.dirs.rename) - _.menu.addItem("kcact:mvdir", _.label("Rename..."), function(e) { - if (!data.removable) return false; - _.fileNameDialog( - {dir: data.path}, - "newName", data.name, _.getURL("renameDir"), { - title: "New folder name:", - errEmpty: "Please enter new folder name.", - errSlash: "Unallowable characters in folder name.", - errDot: "Folder name shouldn't begins with '.'" - }, function(dt) { - if (!dt.name) { - _.alert(_.label("Unknown error.")); - return; - } - var currentDir = (data.path == _.dir); - dir.children('span.folder').html($.$.htmlData(dt.name)); - dir.data('name', dt.name); - dir.data('path', $.$.dirname(data.path) + '/' + dt.name); - if (currentDir) - _.dir = dir.data('path'); - _.initDropUpload(); - }, - true - ); - return false; - }, !data.removable); - - // DELETE - if (_.access.dirs['delete']) - _.menu.addItem("kcact:rmdir", _.label("Delete"), function() { - if (!data.removable) return false; - _.confirm( - _.label("Are you sure you want to delete this folder and all its content?"), - function(callBack) { - $.ajax({ - type: "post", - dataType: "json", - url: _.getURL("deleteDir"), - data: {dir: data.path}, - async: false, - success: function(data) { - if (callBack) callBack(); - if (_.check4errors(data)) - return; - dir.parent().hide(500, function() { - var folders = dir.parent().parent(); - var pDir = folders.parent().children('a').first(); - dir.parent().detach(); - if (!folders.children('div.folder').get(0)) { - pDir.children('span.brace').first().removeClass('opened closed'); - pDir.parent().children('.folders').detach(); - pDir.data('hasDirs', false); - } - if (pDir.data('path') == _.dir.substr(0, pDir.data('path').length)) - _.changeDir(pDir); - _.initDropUpload(); - }); - }, - error: function() { - if (callBack) callBack(); - _.alert(_.label("Unknown error.")); - } - }); - } - ); - return false; - }, !data.removable); - - _.menu.show(e); - - $('div.folder > a > span.folder').removeClass('context'); - if (dir.children('span.folder').hasClass('regular')) - dir.children('span.folder').addClass('context'); -}; - -// CLIPBOARD MENU -_.openClipboard = function() { - - if (!_.clipboard || !_.clipboard.length) return; - - // CLOSE MENU - if ($('#menu a[href="kcact:clrcbd"]').html()) { - $('#clipboard').removeClass('selected'); - _.menu.hide(); - return; - } - - setTimeout(function() { - _.menu.init(); - - var dlg = $('#menu'), - jStatus = $('#status'), - html = '
        • '; - - // CLIPBOARD FILES - $.each(_.clipboard, function(i, val) { - var icon = $.$.getFileExtension(val.name); - if (val.thumb) - icon = ".image"; - else if (!val.smallIcon || !icon.length) - icon = "."; - icon = "themes/" + _.theme + "/img/files/small/" + icon + ".png"; - html += '' + $.$.htmlData($.$.basename(val.name)) + ''; - }); - html += '
        • -
        • '; - $('#menu ul').append(html); - - // DOWNLOAD - if (_.support.zip) - _.menu.addItem("kcact:download", _.label("Download files"), function() { - _.downloadClipboard(); - return false; - }); - - if (_.access.files.copy || _.access.files.move || _.access.files['delete']) - _.menu.addDivider(); - - // COPY - if (_.access.files.copy) - _.menu.addItem("kcact:cpcbd", _.label("Copy files here"), function() { - if (!_.dirWritable) return false; - _.copyClipboard(_.dir); - return false; - }, !_.dirWritable); - - // MOVE - if (_.access.files.move) - _.menu.addItem("kcact:mvcbd", _.label("Move files here"), function() { - if (!_.dirWritable) return false; - _.moveClipboard(_.dir); - return false; - }, !_.dirWritable); - - // DELETE - if (_.access.files['delete']) - _.menu.addItem("kcact:rmcbd", _.label("Delete files"), function() { - _.confirm( - _.label("Are you sure you want to delete all files in the Clipboard?"), - function(callBack) { - if (callBack) callBack(); - _.deleteClipboard(); - } - ); - return false; - }); - - _.menu.addDivider(); - - // CLEAR CLIPBOARD - _.menu.addItem("kcact:clrcbd", _.label("Clear the Clipboard"), function() { - _.clearClipboard(); - return false; - }); - - $('#clipboard').addClass('selected'); - _.menu.show(); - - var left = $(window).width() - dlg.css({width: ""}).outerWidth(), - top = $(window).height() - dlg.outerHeight() - jStatus.outerHeight(), - lheight = top + dlg.outerTopSpace(); - - dlg.find('.list').css({ - 'max-height': lheight, - 'overflow-y': "auto", - 'overflow-x': "hidden", - width: "" - }); - - top = $(window).height() - dlg.outerHeight(true) - jStatus.outerHeight(true); - - dlg.css({ - left: left - 5, - top: top - }).fadeIn("fast"); - - var a = dlg.find('.list').outerHeight(), - b = dlg.find('.list div').outerHeight(); - - if (b - a > 10) { - dlg.css({ - left: parseInt(dlg.css('left')) - _.scrollbarWidth, - }).width(dlg.width() + _.scrollbarWidth); - } - }, 1); -}; -/** This file is part of KCFinder project - * - * @desc Image viewer - * @package KCFinder - * @version 3.12 - * @author Pavel Tzonkov - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - -_.viewImage = function(data) { - - var ts = new Date().getTime(), - dlg = false, - images = [], - - showImage = function(data) { - _.lock = true; - $('#loading').html(_.label("Loading image...")).show(); - - var url = $.$.escapeDirs(_.uploadURL + "/" + _.dir + "/" + data.name) + "?ts=" + ts, - img = new Image(), - i = $(img), - w = $(window), - d = $(document); - - onImgLoad = function() { - _.lock = false; - - $('#files .file').each(function() { - if ($(this).data('name') == data.name) { - _.ssImage = this; - return false; - } - }); - - i.hide().appendTo('body'); - - var o_w = i.width(), - o_h = i.height(), - i_w = o_w, - i_h = o_h, - - goTo = function(i) { - if (!_.lock) { - var nimg = images[i]; - _.currImg = i; - showImage(nimg); - } - }, - - nextFunc = function() { - goTo((_.currImg >= images.length - 1) ? 0 : (_.currImg + 1)); - }, - - prevFunc = function() { - goTo((_.currImg ? _.currImg : images.length) - 1); - }, - - t = $('
          '); - - i.detach().appendTo(t); - t.addClass("img"); - - if (!dlg) { - - var ww = w.width() - 60, - - closeFunc = function() { - d.unbind('keydown').keydown(function(e) { - return !_.selectAll(e); - }); - dlg.dialog('destroy').detach(); - }; - - if ((ww % 2)) ww++; - - dlg = _.dialog($.$.htmlData(data.name), t.get(0), { - width: ww, - height: w.height() - 36, - position: [30, 30], - draggable: false, - nopadding: true, - close: closeFunc, - show: false, - hide: false, - buttons: [ - { - text: _.label("Previous"), - icons: {primary: "ui-icon-triangle-1-w"}, - click: prevFunc - - }, { - text: _.label("Next"), - icons: {secondary: "ui-icon-triangle-1-e"}, - click: nextFunc - - }, { - text: _.label("Select"), - icons: {primary: "ui-icon-check"}, - click: function(e) { - d.unbind('keydown').keydown(function(e) { - return !_.selectAll(e); - }); - if (_.ssImage) { - _.selectFile($(_.ssImage), e); - } - dlg.dialog('destroy').detach(); - } - - }, { - text: _.label("Close"), - icons: {primary: "ui-icon-closethick"}, - click: closeFunc - } - ] - }); - - dlg.addClass('kcfImageViewer').css('overflow', "hidden").parent().find('.ui-dialog-buttonpane button').get(2).focus(); - - } else { - dlg.prev().find('.ui-dialog-title').html($.$.htmlData(data.name)); - dlg.html(t.get(0)); - } - - dlg.unbind('click').click(nextFunc).disableTextSelect(); - - var d_w = dlg.innerWidth(), - d_h = dlg.innerHeight(); - - if ((o_w > d_w) || (o_h > d_h)) { - i_w = d_w; - i_h = d_h; - if ((d_w / d_h) > (o_w / o_h)) - i_w = parseInt((o_w * d_h) / o_h); - else if ((d_w / d_h) < (o_w / o_h)) - i_h = parseInt((o_h * d_w) / o_w); - } - - i.css({ - width: i_w, - height: i_h - }).show().parent().css({ - display: "block", - margin: "0 auto", - width: i_w, - height: i_h, - marginTop: parseInt((d_h - i_h) / 2) - }); - - $('#loading').hide(); - - d.unbind('keydown').keydown(function(e) { - if (!_.lock) { - var kc = e.keyCode; - if ((kc == 37)) prevFunc(); - if ((kc == 39)) nextFunc(); - } - }); - }; - - img.src = url; - - if (img.complete) - onImgLoad(); - else { - img.onload = onImgLoad; - img.onerror = function() { - _.lock = false; - $('#loading').hide(); - _.alert(_.label("Unknown error.")); - d.unbind('keydown').keydown(function(e) { - return !_.selectAll(e); - }); - _.refresh(); - }; - } - }; - - $.each(_.files, function(i, file) { - var i = images.length; - if (file.thumb || file.smallThumb) - images[i] = file; - if (file.name == data.name) - _.currImg = i; - }); - - showImage(data); - return false; -}; -/** This file is part of KCFinder project - * - * @desc Clipboard functionality - * @package KCFinder - * @version 3.12 - * @author Pavel Tzonkov - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - -_.initClipboard = function() { - if (!_.clipboard || !_.clipboard.length) return; - - var size = 0, - jClipboard = $('#clipboard'); - - $.each(_.clipboard, function(i, val) { - size += val.size; - }); - size = _.humanSize(size); - jClipboard.disableTextSelect().html('
          '); - var resize = function() { - jClipboard.css({ - left: $(window).width() - jClipboard.outerWidth(), - top: $(window).height() - jClipboard.outerHeight() - }); - }; - resize(); - jClipboard.show(); - $(window).unbind().resize(function() { - _.resize(); - resize(); - }); -}; - -_.removeFromClipboard = function(i) { - if (!_.clipboard || !_.clipboard[i]) return false; - if (_.clipboard.length == 1) { - _.clearClipboard(); - _.menu.hide(); - return; - } - - if (i < _.clipboard.length - 1) { - var last = _.clipboard.slice(i + 1); - _.clipboard = _.clipboard.slice(0, i); - _.clipboard = _.clipboard.concat(last); - } else - _.clipboard.pop(); - - _.initClipboard(); - _.menu.hide(); - _.openClipboard(); - return true; -}; - -_.copyClipboard = function(dir) { - if (!_.clipboard || !_.clipboard.length) return; - var files = [], - failed = 0; - for (i = 0; i < _.clipboard.length; i++) - if (_.clipboard[i].readable) - files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; - else - failed++; - if (_.clipboard.length == failed) { - _.alert(_.label("The files in the Clipboard are not readable.")); - return; - } - var go = function(callBack) { - if (dir == _.dir) - _.fadeFiles(); - $.ajax({ - type: "post", - dataType: "json", - url: _.getURL("cp_cbd"), - data: {dir: dir, files: files}, - async: false, - success: function(data) { - if (callBack) callBack(); - _.check4errors(data); - _.clearClipboard(); - if (dir == _.dir) - _.refresh(); - }, - error: function() { - if (callBack) callBack(); - $('#files > div').css({ - opacity: "", - filter: "" - }); - _.alert(_.label("Unknown error.")); - } - }); - }; - - if (failed) - _.confirm( - _.label("{count} files in the Clipboard are not readable. Do you want to copy the rest?", {count:failed}), - go - ) - else - go(); - -}; - -_.moveClipboard = function(dir) { - if (!_.clipboard || !_.clipboard.length) return; - var files = [], - failed = 0; - for (i = 0; i < _.clipboard.length; i++) - if (_.clipboard[i].readable && _.clipboard[i].writable) - files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; - else - failed++; - if (_.clipboard.length == failed) { - _.alert(_.label("The files in the Clipboard are not movable.")) - return; - } - - var go = function(callBack) { - _.fadeFiles(); - $.ajax({ - type: "post", - dataType: "json", - url: _.getURL("mv_cbd"), - data: {dir: dir, files: files}, - async: false, - success: function(data) { - if (callBack) callBack(); - _.check4errors(data); - _.clearClipboard(); - _.refresh(); - }, - error: function() { - if (callBack) callBack(); - $('#files > div').css({ - opacity: "", - filter: "" - }); - _.alert(_.label("Unknown error.")); - } - }); - }; - - if (failed) - _.confirm( - _.label("{count} files in the Clipboard are not movable. Do you want to move the rest?", {count: failed}), - go - ); - else - go(); -}; - -_.deleteClipboard = function() { - if (!_.clipboard || !_.clipboard.length) return; - var files = [], - failed = 0; - for (i = 0; i < _.clipboard.length; i++) - if (_.clipboard[i].readable && _.clipboard[i].writable) - files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; - else - failed++; - if (_.clipboard.length == failed) { - _.alert(_.label("The files in the Clipboard are not removable.")) - return; - } - var go = function(callBack) { - _.fadeFiles(); - $.ajax({ - type: "post", - dataType: "json", - url: _.getURL("rm_cbd"), - data: {files:files}, - async: false, - success: function(data) { - if (callBack) callBack(); - _.check4errors(data); - _.clearClipboard(); - _.refresh(); - }, - error: function() { - if (callBack) callBack(); - $('#files > div').css({ - opacity: "", - filter: "" - }); - _.alert(_.label("Unknown error.")); - } - }); - }; - if (failed) - _.confirm( - _.label("{count} files in the Clipboard are not removable. Do you want to delete the rest?", {count: failed}), - go - ); - else - go(); -}; - -_.downloadClipboard = function() { - if (!_.clipboard || !_.clipboard.length) return; - var files = []; - for (i = 0; i < _.clipboard.length; i++) - if (_.clipboard[i].readable) - files[i] = _.clipboard[i].dir + "/" + _.clipboard[i].name; - if (files.length) - _.post(_.getURL('downloadClipboard'), {files:files}); -}; - -_.clearClipboard = function() { - $('#clipboard').html(""); - _.clipboard = []; -}; -/** This file is part of KCFinder project - * - * @desc Upload files using drag and drop - * @package KCFinder - * @version 3.12 - * @author Forum user (updated by Pavel Tzonkov) - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - -_.initDropUpload = function() { - if ((typeof XMLHttpRequest == "undefined") || - (typeof document.addEventListener == "undefined") || - (typeof File == "undefined") || - (typeof FileReader == "undefined") - ) - return; - - if (!XMLHttpRequest.prototype.sendAsBinary) { - XMLHttpRequest.prototype.sendAsBinary = function(datastr) { - var ords = Array.prototype.map.call(datastr, function(x) { - return x.charCodeAt(0) & 0xff; - }), - ui8a = new Uint8Array(ords); - this.send(ui8a.buffer); - } - } - - var uploadQueue = [], - uploadInProgress = false, - filesCount = 0, - errors = [], - files = $('#files'), - folders = $('div.folder > a'), - boundary = "------multipartdropuploadboundary" + (new Date).getTime(), - currentFile, - - filesDragOver = function(e) { - if (e.preventDefault) e.preventDefault(); - $('#files').addClass('drag'); - return false; - }, - - filesDragEnter = function(e) { - if (e.preventDefault) e.preventDefault(); - return false; - }, - - filesDragLeave = function(e) { - if (e.preventDefault) e.preventDefault(); - $('#files').removeClass('drag'); - return false; - }, - - filesDrop = function(e) { - if (e.preventDefault) e.preventDefault(); - if (e.stopPropagation) e.stopPropagation(); - $('#files').removeClass('drag'); - if (!$('#folders span.current').first().parent().data('writable')) { - _.alert("Cannot write to upload folder."); - return false; - } - filesCount += e.dataTransfer.files.length; - for (var i = 0; i < e.dataTransfer.files.length; i++) { - var file = e.dataTransfer.files[i]; - file.thisTargetDir = _.dir; - uploadQueue.push(file); - } - processUploadQueue(); - return false; - }, - - folderDrag = function(e) { - if (e.preventDefault) e.preventDefault(); - return false; - }, - - folderDrop = function(e, dir) { - if (e.preventDefault) e.preventDefault(); - if (e.stopPropagation) e.stopPropagation(); - if (!$(dir).data('writable')) { - _.alert(_.label("Cannot write to upload folder.")); - return false; - } - filesCount += e.dataTransfer.files.length; - for (var i = 0; i < e.dataTransfer.files.length; i++) { - var file = e.dataTransfer.files[i]; - file.thisTargetDir = $(dir).data('path'); - uploadQueue.push(file); - } - processUploadQueue(); - return false; - }; - - files.get(0).removeEventListener('dragover', filesDragOver, false); - files.get(0).removeEventListener('dragenter', filesDragEnter, false); - files.get(0).removeEventListener('dragleave', filesDragLeave, false); - files.get(0).removeEventListener('drop', filesDrop, false); - - files.get(0).addEventListener('dragover', filesDragOver, false); - files.get(0).addEventListener('dragenter', filesDragEnter, false); - files.get(0).addEventListener('dragleave', filesDragLeave, false); - files.get(0).addEventListener('drop', filesDrop, false); - - folders.each(function() { - var folder = this, - - dragOver = function(e) { - $(folder).children('span.folder').addClass('context'); - return folderDrag(e); - }, - - dragLeave = function(e) { - $(folder).children('span.folder').removeClass('context'); - return folderDrag(e); - }, - - drop = function(e) { - $(folder).children('span.folder').removeClass('context'); - return folderDrop(e, folder); - }; - - this.removeEventListener('dragover', dragOver, false); - this.removeEventListener('dragenter', folderDrag, false); - this.removeEventListener('dragleave', dragLeave, false); - this.removeEventListener('drop', drop, false); - - this.addEventListener('dragover', dragOver, false); - this.addEventListener('dragenter', folderDrag, false); - this.addEventListener('dragleave', dragLeave, false); - this.addEventListener('drop', drop, false); - }); - - function updateProgress(evt) { - var progress = evt.lengthComputable - ? Math.round((evt.loaded * 100) / evt.total) + '%' - : Math.round(evt.loaded / 1024) + " KB"; - $('#loading').html(_.label("Uploading file {number} of {count}... {progress}", { - number: filesCount - uploadQueue.length, - count: filesCount, - progress: progress - })); - } - - function processUploadQueue() { - if (uploadInProgress) - return false; - - if (uploadQueue && uploadQueue.length) { - var file = uploadQueue.shift(); - currentFile = file; - $('#loading').html(_.label("Uploading file {number} of {count}... {progress}", { - number: filesCount - uploadQueue.length, - count: filesCount, - progress: "" - })).show(); - - var reader = new FileReader(); - reader.thisFileName = file.name; - reader.thisFileType = file.type; - reader.thisFileSize = file.size; - reader.thisTargetDir = file.thisTargetDir; - - reader.onload = function(evt) { - uploadInProgress = true; - - var postbody = '--' + boundary + '\r\nContent-Disposition: form-data; name="upload[]"'; - if (evt.target.thisFileName) - postbody += '; filename="' + $.$.utf8encode(evt.target.thisFileName) + '"'; - postbody += '\r\n'; - if (evt.target.thisFileSize) - postbody += "Content-Length: " + evt.target.thisFileSize + "\r\n"; - postbody += "Content-Type: " + evt.target.thisFileType + "\r\n\r\n" + evt.target.result + "\r\n--" + boundary + '\r\nContent-Disposition: form-data; name="dir"\r\n\r\n' + $.$.utf8encode(evt.target.thisTargetDir) + "\r\n--" + boundary + "\r\n--" + boundary + "--\r\n"; - - var xhr = new XMLHttpRequest(); - xhr.thisFileName = evt.target.thisFileName; - - if (xhr.upload) { - xhr.upload.thisFileName = evt.target.thisFileName; - xhr.upload.addEventListener("progress", updateProgress, false); - } - xhr.open('post', _.getURL('upload'), true); - xhr.setRequestHeader('Content-Type', "multipart/form-data; boundary=" + boundary); - //xhr.setRequestHeader('Content-Length', postbody.length); - - xhr.onload = function(e) { - $('#loading').hide(); - if (_.dir == reader.thisTargetDir) - _.fadeFiles(); - uploadInProgress = false; - processUploadQueue(); - if (xhr.responseText.substr(0, 1) != "/") - errors[errors.length] = xhr.responseText; - }; - - xhr.sendAsBinary(postbody); - }; - - reader.onerror = function(evt) { - $('#loading').hide(); - uploadInProgress = false; - processUploadQueue(); - errors[errors.length] = _.label("Failed to upload {filename}!", { - filename: evt.target.thisFileName - }); - }; - - reader.readAsBinaryString(file); - - } else { - filesCount = 0; - var loop = setInterval(function() { - if (uploadInProgress) return; - boundary = "------multipartdropuploadboundary" + (new Date).getTime(); - uploadQueue = []; - clearInterval(loop); - if (currentFile.thisTargetDir == _.dir) - _.refresh(); - if (errors.length) { - errors = errors.join("\n"); - if (errors.replace(/^\s+/g, "").replace(/\s+$/g, "").length) - _.alert(errors); - errors = []; - } - }, 333); - } - } -}; -/** This file is part of KCFinder project - * - * @desc Miscellaneous functionality - * @package KCFinder - * @version 3.12 - * @author Pavel Tzonkov - * @copyright 2010-2014 KCFinder Project - * @license http://opensource.org/licenses/GPL-3.0 GPLv3 - * @license http://opensource.org/licenses/LGPL-3.0 LGPLv3 - * @link http://kcfinder.sunhater.com - */ - -_.orderFiles = function(callBack, selected) { - var order = $.$.kuki.get('order'), - desc = ($.$.kuki.get('orderDesc') == "on"), - a1, b1, arr; - - if (!_.files || !_.files.sort) - _.files = []; - - _.files = _.files.sort(function(a, b) { - if (!order) order = "name"; - - if (order == "date") { - a1 = a.mtime; - b1 = b.mtime; - } else if (order == "type") { - a1 = $.$.getFileExtension(a.name); - b1 = $.$.getFileExtension(b.name); - } else if (order == "size") { - a1 = a.size; - b1 = b.size; - } else { - a1 = a[order].toLowerCase(); - b1 = b[order].toLowerCase(); - } - - if ((order == "size") || (order == "date")) { - if (a1 < b1) return desc ? 1 : -1; - if (a1 > b1) return desc ? -1 : 1; - } - - if (a1 == b1) { - a1 = a.name.toLowerCase(); - b1 = b.name.toLowerCase(); - arr = [a1, b1]; - arr = arr.sort(); - return (arr[0] == a1) ? -1 : 1; - } - - arr = [a1, b1]; - arr = arr.sort(); - if (arr[0] == a1) return desc ? 1 : -1; - return desc ? -1 : 1; - }); - - _.showFiles(callBack, selected); - _.initFiles(); -}; - -_.humanSize = function(size) { - if (size < 1024) { - size = size.toString() + " B"; - } else if (size < 1048576) { - size /= 1024; - size = parseInt(size).toString() + " KB"; - } else if (size < 1073741824) { - size /= 1048576; - size = parseInt(size).toString() + " MB"; - } else if (size < 1099511627776) { - size /= 1073741824; - size = parseInt(size).toString() + " GB"; - } else { - size /= 1099511627776; - size = parseInt(size).toString() + " TB"; - } - return size; -}; - -_.getURL = function(act) { - var url = "browse.php?type=" + encodeURIComponent(_.type) + "&lng=" + encodeURIComponent(_.lang); - if (_.opener.name) - url += "&opener=" + encodeURIComponent(_.opener.name); - if (act) - url += "&act=" + encodeURIComponent(act); - if (_.cms) - url += "&cms=" + encodeURIComponent(_.cms); - return url; -}; - -_.label = function(index, data) { - var label = _.labels[index] ? _.labels[index] : index; - if (data) - $.each(data, function(key, val) { - label = label.replace("{" + key + "}", val); - }); - return label; -}; - -_.check4errors = function(data) { - if (!data.error) - return false; - var msg = data.error.join - ? data.error.join("\n") - : data.error; - _.alert(msg); - return true; -}; - -_.post = function(url, data) { - var html = '
          '; - $.each(data, function(key, val) { - if ($.isArray(val)) - $.each(val, function(i, aval) { - html += ''; - }); - else - html += ''; - }); - if(typeof _.csrftoken!="undefined") - html += ''; - - html += '
          '; - $('#menu').html(html).show(); - $('#postForm').get(0).submit(); -}; - -_.fadeFiles = function() { - $('#files > div').css({ - opacity: "0.4", - filter: "alpha(opacity=40)" - }); -}; diff --git a/third_party/kcfinder/cache/theme_default.css b/third_party/kcfinder/cache/theme_default.css deleted file mode 100644 index 35b2f738e67..00000000000 --- a/third_party/kcfinder/cache/theme_default.css +++ /dev/null @@ -1,2440 +0,0 @@ -/* - -This CSS code is generated from http://ui.sunhater.com -(c)2014 Pavel Tzonkov, sunhater.com. All rights reserved. - -*/ -/*** jQueryUI */ -/** Base */ - -.ui-helper-hidden { - display: none; -} -.ui-helper-hidden-accessible { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} -.ui-helper-reset { - margin: 0; - padding: 0; - border: 0; - outline: 0; - line-height: 1.3; - text-decoration: none; - font-size: 100%; - list-style: none; -} -.ui-helper-clearfix:before, -.ui-helper-clearfix:after { - content: ""; - display: table; - border-collapse: collapse; -} -.ui-helper-clearfix:after { - clear: both; -} -.ui-helper-clearfix { - min-height: 0; /* support: IE7 */ -} -.ui-helper-zfix { - width: 100%; - height: 100%; - top: 0; - left: 0; - position: absolute; - opacity: 0; - filter:alpha(opacity=0); -} - -.ui-front { - z-index: 100; -} - -.ui-widget .ui-widget, -.ui-widget input, -.ui-widget select, -.ui-widget textarea, -.ui-widget button { - font-size: 1em; -} -.ui-widget-content { - border: 1px solid #888; - background: #fff; - color: #6B6B6B; -} -.ui-widget-content a { - color: #6B6B6B; -} -.ui-widget-header { - border: 1px solid #1b79b8; - color: #fff; - font-weight: bold; - background: #1b79b8; - background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); - background: -moz-linear-gradient(top, #1b79b8, #59b5f2); - background: -ms-linear-gradient(top, #1b79b8, #59b5f2); - background: -o-linear-gradient(top, #1b79b8, #59b5f2); - background: linear-gradient(to bottom, #1b79b8, #59b5f2); -} -.ui-widget-header a { - color: #fff; -} - -/* Interaction states -----------------------------------*/ - -.ui-state-default, -.ui-widget-content .ui-state-default, -.ui-widget-header .ui-state-default, -.ui-widget.ui-state-disabled { - transition: .2s; - border: 1px solid #6b6b6b; - background: #6b6b6b; - background: -webkit-linear-gradient(top, #ababab, #6b6b6b); - background: -moz-linear-gradient(top, #ababab, #6b6b6b); - background: -ms-linear-gradient(top, #ababab, #6b6b6b); - background: -o-linear-gradient(top, #ababab, #6b6b6b); - background: linear-gradient(to bottom, #ababab, #6b6b6b); - font-weight: bold; - color: #fff; -} - -.ui-state-hover, -.ui-widget-content .ui-state-hover, -.ui-widget-header .ui-state-hover, -.ui-state-focus, -.ui-widget-content .ui-state-focus, -.ui-widget-header .ui-state-focus { - transition: .2s; - border: 1px solid #6b6b6b; - background: #6b6b6b; - background: -webkit-linear-gradient(top, #6b6b6b, #ababab); - background: -moz-linear-gradient(top, #6b6b6b, #ababab); - background: -ms-linear-gradient(top, #6b6b6b, #ababab); - background: -o-linear-gradient(top, #6b6b6b, #ababab); - background: linear-gradient(to bottom, #6b6b6b, #ababab); - font-weight: bold; - color: #fff; -} - -.ui-state-active, -.ui-widget-content .ui-state-active, -.ui-widget-header .ui-state-active, -.ui-menu .ui-state-focus { - transition: .2s; - border: 1px solid #1b79b8; - background: #1b79b8; - background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); - background: -moz-linear-gradient(top, #1b79b8, #59b5f2); - background: -ms-linear-gradient(top, #1b79b8, #59b5f2); - background: -o-linear-gradient(top, #1b79b8, #59b5f2); - background: linear-gradient(to bottom, #1b79b8, #59b5f2); - font-weight: bold; - color: #fff; -} - -.ui-state-default a, -.ui-state-default a:link, -.ui-state-default a:visited, -.ui-state-hover a, -.ui-state-hover a:hover, -.ui-state-hover a:link, -.ui-state-hover a:visited, -.ui-state-active a, -.ui-state-active a:link, -.ui-state-active a:visited { - transition: .2s; - color: #fff; - text-decoration: none; -} - -.ui-menu .ui-state-active { - transition: .2s; - border-color: #6b6b6b; - background: #6b6b6b; - background: -webkit-linear-gradient(top, #6b6b6b, #ababab); - background: -moz-linear-gradient(top, #6b6b6b, #ababab); - background: -ms-linear-gradient(top, #6b6b6b, #ababab); - background: -o-linear-gradient(top, #6b6b6b, #ababab); - background: linear-gradient(to bottom, #6b6b6b, #ababab); -} - -/* Interaction Cues -----------------------------------*/ - -.ui-state-highlight, -.ui-widget-content .ui-state-highlight, -.ui-widget-header .ui-state-highlight { - border: 1px solid #d5bc2c; - box-shadow: inset 0 0 5px #d5bc2c; - background: #fff6bf; - color: #6b6b6b; -} -.ui-state-error, -.ui-widget-content .ui-state-error, -.ui-widget-header .ui-state-error { - border: 1px solid #cf7f7f; - box-shadow: inset 0 0 5px #cf7f7f; - background: #fac4c4; - color: #6b6b6b; -} -.ui-state-error a, -.ui-widget-content .ui-state-error a, -.ui-widget-header .ui-state-error a, -.ui-state-highlight a, -.ui-widget-content .ui-state-highlight a, -.ui-widget-header .ui-state-highlight a, -.ui-state-error-text, -.ui-widget-content .ui-state-error-text, -.ui-widget-header .ui-state-error-text { - color: #6b6b6b; -} -.ui-priority-primary, -.ui-widget-content .ui-priority-primary, -.ui-widget-header .ui-priority-primary { - font-weight: bold; -} -.ui-priority-secondary, -.ui-widget-content .ui-priority-secondary, -.ui-widget-header .ui-priority-secondary { - opacity: .5; - filter:alpha(opacity=50); - font-weight: normal; -} -.ui-state-disabled, -.ui-widget-content .ui-state-disabled, -.ui-widget-header .ui-state-disabled { - opacity: .50; - filter:alpha(opacity=50); - background-image: none; -} -.ui-state-disabled .ui-icon { - filter:alpha(opacity=50); /* For IE8 - See #6059 */ -} - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { - cursor: default !important; -} - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; -} -.ui-resizable { - position: relative; -} -.ui-resizable-handle { - position: absolute; - font-size: 0.1px; - display: block; -} -.ui-resizable-disabled .ui-resizable-handle, -.ui-resizable-autohide .ui-resizable-handle { - display: none; -} -.ui-resizable-n { - cursor: n-resize; - height: 7px; - width: 100%; - top: -5px; - left: 0; -} -.ui-resizable-s { - cursor: s-resize; - height: 7px; - width: 100%; - bottom: -5px; - left: 0; -} -.ui-resizable-e { - cursor: e-resize; - width: 7px; - right: -5px; - top: 0; - height: 100%; -} -.ui-resizable-w { - cursor: w-resize; - width: 7px; - left: -5px; - top: 0; - height: 100%; -} -.ui-resizable-se { - cursor: se-resize; - width: 12px; - height: 12px; - right: 1px; - bottom: 1px; -} -.ui-resizable-sw { - cursor: sw-resize; - width: 9px; - height: 9px; - left: -5px; - bottom: -5px; -} -.ui-resizable-nw { - cursor: nw-resize; - width: 9px; - height: 9px; - left: -5px; - top: -5px; -} -.ui-resizable-ne { - cursor: ne-resize; - width: 9px; - height: 9px; - right: -5px; - top: -5px; -} -.ui-selectable-helper { - position: absolute; - z-index: 100; - border: 1px dotted black; -} - - -/** Accordion */ - -.ui-accordion .ui-accordion-header { - display: block; - cursor: pointer; - position: relative; - margin-top: 2px; - padding: 6px; - min-height: 0; /* support: IE7 */ -} -.ui-accordion .ui-accordion-icons, -.ui-accordion .ui-accordion-icons .ui-accordion-icons { - padding-left: 24px; -} -.ui-accordion .ui-accordion-noicons { - padding-left: 5px; -} - -.ui-accordion .ui-accordion-header .ui-accordion-header-icon { - position: absolute; - left: 5px; - top: 50%; - margin-top: -8px; -} -.ui-accordion .ui-accordion-content { - padding: 1em; - border-top: 0; - overflow: auto; -} - - -/** Autocomplete */ - -.ui-autocomplete { - position: absolute; - top: 0; - left: 0; - cursor: pointer; -} - - -/** Button */ - -.ui-button { - display: inline-block; - position: relative; - padding: 0; - line-height: normal; - cursor: pointer; - vertical-align: middle; - text-align: center; - overflow: visible; /* removes extra width in IE */ -} -.ui-button, -.ui-button:link, -.ui-button:visited, -.ui-button:hover, -.ui-button:active { - text-decoration: none; -} -/* to make room for the icon, a width needs to be set here */ -.ui-button-icon-only { - width: 36px; -} -.ui-button-icons-only { - width: 50px; -} -/* button text element */ -.ui-button .ui-button-text { - display: block; - line-height: normal; -} -.ui-button-text-only .ui-button-text { - padding: 6px 10px; -} -.ui-button-icon-only .ui-button-text, -.ui-button-icons-only .ui-button-text { - padding: 6px; - text-indent: -9999999px; -} -.ui-button-text-icon-primary .ui-button-text, -.ui-button-text-icons .ui-button-text { - padding: 6px 10px 6px 28px; -} -.ui-button-text-icon-secondary .ui-button-text, -.ui-button-text-icons .ui-button-text { - padding: 6px 28px 6px 10px; -} -.ui-button-text-icons .ui-button-text { - padding-left: 28px; - padding-right: 28px; -} -/* no icon support for input elements, provide padding by default */ -input.ui-button { - padding: 6px 10px; -} - -/* button icon element(s) */ -.ui-button-icon-only .ui-icon, -.ui-button-text-icon-primary .ui-icon, -.ui-button-text-icon-secondary .ui-icon, -.ui-button-text-icons .ui-icon, -.ui-button-icons-only .ui-icon { - position: absolute; - top: 50%; - margin-top: -8px; -} -.ui-button-icon-only .ui-icon { - left: 50%; - margin-left: -8px; -} -.ui-button-text-icon-primary .ui-button-icon-primary, -.ui-button-text-icons .ui-button-icon-primary, -.ui-button-icons-only .ui-button-icon-primary { - left: 7px; -} -.ui-button-text-icon-secondary .ui-button-icon-secondary, -.ui-button-text-icons .ui-button-icon-secondary, -.ui-button-icons-only .ui-button-icon-secondary { - right: 7px; -} -/* workarounds */ -/* reset extra padding in Firefox, see h5bp.com/l */ -input.ui-button::-moz-focus-inner, -button.ui-button::-moz-focus-inner { - border: 0; - padding: 0; -} - - -/** Button set */ - -.ui-buttonset { - margin:0; - overflow:auto; -} -.ui-buttonset .ui-button { - margin: 0; - float:left; -} - - -/** Date picker */ - -.ui-datepicker { - width: 19em; - width: 19em; - display: none; - padding: 10px; -} -.ui-datepicker .ui-datepicker-header { - position: relative; - padding: 2px 0; -} -.ui-datepicker .ui-datepicker-prev, -.ui-datepicker .ui-datepicker-next { - position: absolute; - top: 4px; - width: 20px; - height: 20px; -} -.ui-datepicker .ui-datepicker-prev-hover, -.ui-datepicker .ui-datepicker-next-hover { - top: 3px; -} -.ui-datepicker .ui-datepicker-prev { - left: 4px; -} -.ui-datepicker .ui-datepicker-next { - right: 4px; -} -.ui-datepicker .ui-datepicker-prev-hover { - left: 3px; -} -.ui-datepicker .ui-datepicker-next-hover { - right: 3px; -} -.ui-datepicker .ui-datepicker-prev span, -.ui-datepicker .ui-datepicker-next span { - display: block; - position: absolute; - left: 50%; - margin-left: -8px; - top: 50%; - margin-top: -8px; -} -.ui-datepicker .ui-datepicker-title { - margin: 0 10px; - padding: 4px 0; - text-align: center; -} -.ui-datepicker .ui-datepicker-title select { - font-size: 1em; - margin:-2px 2px; - padding:0; - outline:0; -} -.ui-datepicker table { - width: 100%; - border-collapse: collapse; - margin: 0; - font-size: 1em; -} -.ui-datepicker th { - padding: 3px; - text-align: center; - font-weight: bold; - border: 0; -} -.ui-datepicker td { - border: 0; - padding: 1px; -} -.ui-datepicker td span, -.ui-datepicker td a { - display: block; - padding: 2px 3px; - text-align: right; - text-decoration: none; -} -.ui-datepicker .ui-datepicker-buttonpane { - background-image: none; - margin: 10px -11px -11px -11px; - padding: 10px; - border: 1px solid #1b79b8; - background: #e4f5ff; - overflow: auto; -} -.ui-datepicker .ui-datepicker-buttonpane button { - float: right; - cursor: pointer; - width: auto; - overflow: visible; - margin: 0; - padding: 6px 10px; - font-weight: bold; - opacity: 1; - filter: alpha(opacity=100); -} -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { - float: left; -} - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { - width: auto; - padding:10px; -} -.ui-datepicker-multi .ui-datepicker-group { - float: left; -} -.ui-datepicker-multi .ui-datepicker-group .ui-datepicker-header { - margin:0; -} -.ui-datepicker-multi .ui-datepicker-group.ui-datepicker-group-last { - margin-right:0; -} - -.ui-datepicker-multi .ui-datepicker-group table { - width: 95%; - margin: 0 auto .4em; -} -.ui-datepicker-multi-2 .ui-datepicker-group { - width: 50%; -} -.ui-datepicker-multi-3 .ui-datepicker-group { - width: 33.3%; -} -.ui-datepicker-multi-4 .ui-datepicker-group { - width: 25%; -} - -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { - border-left-width: 0; -} -.ui-datepicker-multi .ui-datepicker-buttonpane { - clear: left; -} -.ui-datepicker-row-break { - clear: both; - font-size: 0; - width: 100px; -} -th.ui-datepicker-week-col { - color: #215b82; -} -td.ui-datepicker-week-col { - text-align:right; - padding-right:7px; - color: #215b82; -} -td.ui-datepicker-other-month a.ui-state-default { - font-weight: bold; -} -th.ui-datepicker-week-end { - color: #f44; -} - -/* RTL support */ -.ui-datepicker-rtl { - direction: rtl; -} -.ui-datepicker-rtl .ui-datepicker-prev { - right: 2px; - left: auto; -} -.ui-datepicker-rtl .ui-datepicker-next { - left: 2px; - right: auto; -} -.ui-datepicker-rtl .ui-datepicker-prev:hover { - right: 1px; - left: auto; -} -.ui-datepicker-rtl .ui-datepicker-next:hover { - left: 1px; - right: auto; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane { - clear: right; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane button { - float: left; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, -.ui-datepicker-rtl .ui-datepicker-group { - float: right; -} -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { - border-right-width: 0; - border-left-width: 1px; -} - - -/** Dialog */ - -.ui-dialog { - position: absolute; - top: 0; - left: 0; - padding: 4px; - outline: 0; - box-shadow: 0 0 10px #000; -} -.ui-dialog .ui-dialog-titlebar { - padding: 5px 10px; - position: relative; -} -.ui-dialog .ui-dialog-title { - float: left; - margin: 0; - padding: 1px 0; - white-space: nowrap; - width: 90%; - overflow: hidden; - text-overflow: ellipsis; -} -.ui-dialog .ui-dialog-titlebar-close { - position: absolute; - right: .3em; - top: 50%; - width: 21px; - margin: -10px 0 0 0; - padding: 1px; - height: 20px; -} -.ui-dialog .ui-dialog-content { - position: relative; - border: 0; - padding: 1em; - margin: 0 -4px; - background: none; - overflow: auto; -} -.ui-dialog .ui-dialog-buttonpane { - text-align: left; - border-width: 1px 0 0 0; - background-image: none; - padding: 10px; -} -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { - float: right; -} -.ui-dialog .ui-dialog-buttonpane button { - margin: 0 0 0 5px; - cursor: pointer; -} -.ui-dialog .ui-resizable-se { - width: 12px; - height: 12px; - right: -5px; - bottom: -5px; - background-position: 16px 16px; -} -.ui-draggable .ui-dialog-titlebar { - cursor: move; -} - - -/** Menu */ - -.ui-menu { - list-style: none; - padding: 0; - margin: 0; - display: block; - outline: 0; -} -.ui-menu .ui-menu { - margin-top: -3px; - position: absolute; -} -.ui-menu .ui-menu-item { - margin: 0; - padding: 0; - width: 100%; - /* support: IE10, see #8844 */ - list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); -} -.ui-menu .ui-menu-divider { - margin: 1px 10px 1px 10px; - height: 0; - font-size: 0; - line-height: 0; - border-width: 1px 0 0 0; - border-color: #bbb; -} -.ui-menu .ui-menu-item a { - text-decoration: none; - display: block; - padding: 5px 10px; - line-height: 1.5; - min-height: 0; /* support: IE7 */ - font-weight: normal; - border-radius:0; -} -.ui-menu .ui-menu-item a.ui-state-focus, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; - transition: none; -} -.ui-menu .ui-state-disabled { - font-weight: normal; - line-height: 1.5; -} -.ui-menu .ui-state-disabled a { - cursor: default; -} -.ui-menu.ui-corner-all.sh-menu { - border-radius: 4px; -} -.ui-menu.ui-corner-all, .ui-menu.sh-menu.ui-autocomplete.ui-corner-all { - border-radius: 0; -} - -/* icon support */ -.ui-menu-icons { - position: relative; -} -.ui-menu-icons .ui-menu-item a { - position: relative; - padding-left: 2em; -} - -/* left-aligned */ -.ui-menu .ui-icon { - position: absolute; - top: .2em; - left: .2em; -} - -/* right-aligned */ -.ui-menu .ui-menu-icon { - position: static; - float: right; -} - - -/** Progress bar */ - -.ui-progressbar { - height: 2.1em; - text-align: left; - overflow: hidden; -} -.ui-progressbar .ui-progressbar-value { - margin: -1px; - height: 100%; -} -.ui-progressbar .ui-progressbar-overlay { - height: 100%; - filter: alpha(opacity=25); - opacity: 0.25; -} -.ui-progressbar-indeterminate .ui-progressbar-value { - background-image: none; -} - - -/** Slider */ - -.ui-slider { - position: relative; - text-align: left; - margin: 0 13px; - border-radius:15px; -} -.ui-slider .ui-slider-handle { - position: absolute; - z-index: 2; - width: 18px; - height: 18px; - border-radius: 9px; - cursor: default; - box-shadow: 0 0 3px #6b6b6b, inset 0 0 7px #fff, inset 0 0 3px #fff; -} -.ui-slider .ui-slider-handle.ui-state-active { - box-shadow: 0 0 3px #1b79b8, inset 0 0 7px #fff, inset 0 0 3px #fff; -} -.ui-slider .ui-slider-range { - position: absolute; - z-index: 1; - display: block; - border: 0; - background-position: 0 0; -} - -/* For IE8 - See #6727 */ -.ui-slider.ui-state-disabled .ui-slider-handle, -.ui-slider.ui-state-disabled .ui-slider-range { - filter: inherit; -} - -.ui-slider-horizontal { - height: 10px; -} -.ui-slider-horizontal .ui-slider-handle { - top: -5px; - margin-left: -9px; -} -.ui-slider-horizontal .ui-slider-range { - top: 0; - height: 100%; -} -.ui-slider-horizontal .ui-slider-range-min { - left: 0; -} -.ui-slider-horizontal .ui-slider-range-max { - right: 0; -} - -.ui-slider-vertical { - width: 10px; - height: 150px; -} -.ui-slider-vertical .ui-slider-handle { - left: -5px; - margin-left: 0; - margin-bottom: -9px; -} -.ui-slider-vertical .ui-slider-range { - left: -1px; - width: 100%; -} -.ui-slider-vertical .ui-slider-range-min { - bottom: 0; -} -.ui-slider-vertical .ui-slider-range-max { - top: 0; -} - - -/** Spinner */ - -.ui-spinner.ui-widget { - position: relative; - display: inline-block; - overflow: hidden; - padding: 0; - vertical-align: middle; - background: #fff; - background: -webkit-linear-gradient(top, #f0f0f0, #fff); - background: -moz-linear-gradient(top, #f0f0f0, #fff); - background: -ms-linear-gradient(top, #f0f0f0, #fff); - background: -o-linear-gradient(top, #f0f0f0, #fff); - background: linear-gradient(to bottom, #f0f0f0, #fff); -} -.ui-spinner-input { - border: none; - color: inherit; - padding: 0; - margin: 6px 24px 6px 10px; - vertical-align: middle; - outline: 0; - background: transparent; -} -.ui-spinner-input { - color: #6b6b6b} -.ui-spinner-input:focus { - color: #000; -} -.ui-spinner-button { - width: 16px; - height: 50%; - font-size: .5em; - padding: 0; - margin: 0; - text-align: center; - position: absolute; - cursor: default; - display: block; - overflow: hidden; - right: 0; -} -/* more specificity required here to overide default borders */ -.ui-spinner a.ui-spinner-button { - border-top: none; - border-bottom: none; - border-right: none; -} -/* vertical centre icon */ -.ui-spinner .ui-icon { - position: absolute; - margin-top: -8px; - top: 50%; - left: 0; -} -.ui-spinner-up { - top: 0; -} -.ui-spinner-down { - bottom: 0; -} - -/* TR overrides */ -.ui-spinner .ui-icon-triangle-1-s { - /* need to fix icons sprite */ - background-position: -65px -16px; -} - - -/** Tabs */ - -.ui-tabs { - position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ -} -.ui-tabs .ui-tabs-nav { - margin: 0; - padding: 3px 3px 0 3px; -} -.ui-tabs .ui-tabs-nav li { - list-style: none; - float: left; - position: relative; - top: 0; - margin: 1px 3px 0 0; - border-bottom-width: 0; - padding: 0; - white-space: nowrap; -} -.ui-tabs .ui-tabs-nav li a { - float: left; - padding: 6px 10px; - text-decoration: none; -} -.ui-tabs .ui-tabs-nav li.ui-tabs-active { - margin-bottom: -1px; - padding-bottom: 1px; -} -.ui-tabs .ui-tabs-nav li.ui-tabs-active a, -.ui-tabs .ui-tabs-nav li.ui-state-disabled a, -.ui-tabs .ui-tabs-nav li.ui-tabs-loading a { - cursor: text; -} -.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { - cursor: pointer; -} -.ui-tabs .ui-tabs-panel { - display: block; - border-width: 0; - padding: 1em; - background: none; -} - -/** Tooltip */ - -body .ui-tooltip { - padding: 6px 10px; - position: absolute; - z-index: 9999; - max-width: 300px; - color: #808080; - border-color: #a5a5a5; - box-shadow: inset 0 0 4px #a5a5a5, 0 0 4px #a5a5a5; - background: -webkit-linear-gradient(top, #ddd, #fff); - background: -moz-linear-gradient(top, #ddd, #fff); - background: -ms-linear-gradient(top, #ddd, #fff); - background: -o-linear-gradient(top, #ddd, #fff); - background: linear-gradient(to bottom, #ddd, #fff); -} - -/** Icons */ - -/* states and images */ -.ui-icon { - display: block; - text-indent: -99999px; - overflow: hidden; - background-repeat: no-repeat; - width: 16px; - height: 16px; -} - -.ui-icon, -.ui-widget-content .ui-icon, -.ui-state-highlight .ui-icon, -.ui-state-error .ui-icon, -.ui-state-error-text .ui-icon, -.ui-icon.ui-icon-black { - background-image: url(img/ui-icons_black.png); -} - -.ui-widget-header .ui-icon, -.ui-state-default .ui-icon, -.ui-state-hover .ui-icon, -.ui-state-focus .ui-icon, -.ui-state-active .ui-icon, -.ui-icon.ui-icon-white { - background-image: url(img/ui-icons_white.png); -} - -/* positioning */ -.ui-icon-blank { background-position: 16px 16px; } -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-on { background-position: -96px -144px; } -.ui-icon-radio-off { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/** Misc */ - -/* Corner radius */ -.ui-corner-all, -.ui-corner-top, -.ui-corner-left, -.ui-corner-tl, -.ui-menu .ui-menu-item.ui-menu-item-first a { - border-top-left-radius: 4px; -} -.ui-corner-all, -.ui-corner-top, -.ui-corner-right, -.ui-corner-tr, -.ui-menu .ui-menu-item.ui-menu-item-first a { - border-top-right-radius:4px; -} -.ui-corner-all, -.ui-corner-bottom, -.ui-corner-left, -.ui-corner-bl, -.ui-menu .ui-menu-item.ui-menu-item-last a, -.ui-dialog-buttonpane, -.ui-datepicker-multi .ui-datepicker-group-first .ui-datepicker-header, -.ui-datepicker .ui-datepicker-buttonpane { - border-bottom-left-radius: 4px; -} -.ui-corner-all, -.ui-corner-bottom, -.ui-corner-right, -.ui-corner-br, -.ui-menu .ui-menu-item.ui-menu-item-last a, -.ui-dialog-buttonpane, -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, -.ui-datepicker .ui-datepicker-buttonpane { - border-bottom-right-radius: 4px; -} - -/* Overlays */ -.ui-widget-overlay { - background: rgba(255,255,255,.5); -} -.ui-widget-shadow { - margin: -7px 0 0 -7px; - padding: 7px; - background: rgba(0,0,0,.3); - border-radius: 8px; -} - -/* SunHater Fixes */ - -.ui-accordion-content-active, .ui-tabs, .ui-slider-range, .ui-datepicker, .ui-dialog { - border-color: #1b79b8; -} - -.ui-slider .ui-slider-range { - border: 1px solid #1b79b8; - top: -1px -} - -.ui-progressbar { - overflow:visible; -} -.ui-progressbar-value { - border: 1px solid #1b79b8; - margin-top: -1px -} - -.ui-accordion-header, -.ui-tabs-nav, -.ui-button, -.ui-tabs li, -.ui-slider-handle, -.ui-slider-range, -.ui-datepicker-header, -.ui-datepicker-header a:hover, -.ui-datepicker-calendar .ui-state-default, -.ui-progressbar-value, -.ui-menu .ui-menu-item a.ui-state-focus, -.ui-menu .ui-menu-item a.ui-state-active, -.ui-dialog-titlebar, -.ui-dialog-titlebar-close.ui-state-default.ui-state-hover, -.ui-datepicker .ui-datepicker-buttonpane button { - box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; -} - -.ui-spinner, -.ui-menu { - box-shadow: inset 0 0 4px #6b6b6b; -} - -.ui-accordion-content, -.ui-tabs, -.ui-dialog-content, -.ui-dialog-buttonpane, -.ui-datepicker, -.ui-datepicker .ui-datepicker-buttonpane { - box-shadow: inset 0 0 4px #1b79b8; -} - -.ui-state-default, -.ui-state-focus, -.ui-state-active, -.ui-widget-header { - text-shadow: - 1px 0 rgba(0,0,0,.2), - -1px 0 rgba(0,0,0,.2), - 0 -1px rgba(0,0,0,.2), - 0 1px rgba(0,0,0,.2), - 1px 1px rgba(0,0,0,.2), - -1px -1px rgba(0,0,0,.2), - 1px -1px rgba(0,0,0,.2), - -1px 1px rgba(0,0,0,.2); -} - -.ui-tabs .ui-state-active, -.ui-datepicker .ui-state-highlight { - text-shadow: none; -} -.ui-datepicker .ui-state-highlight { - color: #215b82; - border-color: #1b79b8; - box-shadow: inset 0 0 4px #1b79b8; - background: #fff; - background: -webkit-linear-gradient(top, #dfeef8, #fff); - background: -moz-linear-gradient(top, #dfeef8, #fff); - background: -ms-linear-gradient(top, #dfeef8, #fff); - background: -o-linear-gradient(top, #dfeef8, #fff); - background: linear-gradient(to bottom, #dfeef8, #fff); -} - -.ui-progressbar, .ui-slider, .ui-menu { - box-shadow: inset 0 0 4px #6b6b6b; - background: #fff; - background: -webkit-linear-gradient(top, #f0f0f0, #fff); - background: -moz-linear-gradient(top, #f0f0f0, #fff); - background: -ms-linear-gradient(top, #f0f0f0, #fff); - background: -o-linear-gradient(top, #f0f0f0, #fff); - background: linear-gradient(to bottom, #f0f0f0, #fff); -} - -.ui-slider, .ui-spinner, .ui-progressbar, .ui-menu { - border-color: #6b6b6b; -} - -.ui-datepicker-calendar .ui-state-default { - border-radius: 3px; -} - -.ui-tabs .ui-tabs-nav { - margin: -1px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - padding-left:3px; -} - -.ui-tabs-active.ui-state-active { - background: #fff; - background: -webkit-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); - background: -moz-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); - background: -ms-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); - background: -o-linear-gradient(top, #ccc, #ddd, #eee, #fff, #fff, #fff); - background: linear-gradient(to bottom, #ccc, #ddd, #eee, #fff, #fff, #fff); - box-shadow: inset 0 0 5px #fff, inset 0 0 5px #fff, inset 0 0 5px #fff; -} -.ui-tabs-active.ui-state-active a { - color: #215b82; -} -.ui-state-default, .ui-state-default a { - outline: 0; -} -.ui-datepicker-header, -.ui-dialog-titlebar { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - margin: -5px -5px 0 -5px; -} -.ui-datepicker-header { - margin: -11px -11px 5px -11px; -} - -.ui-datepicker-header a:hover { - cursor: pointer; -} - -.ui-dialog-titlebar-close.ui-state-default { - border-color: transparent; - background: none; - box-shadow: none; -} - -.ui-dialog-titlebar-close.ui-state-default.ui-state-hover { - border-color: #6b6b6b; - background: #6b6b6b} - -.ui-dialog-buttonpane { - background: #e4f5ff; - border-top-color: #1b79b8; - margin: 0 -4px -4px -4px; - padding: 0; -} - -/*** Uniform */ -/* Remove default webkit and possible mozilla .search styles. - * Keeping this as :active to remove browser styles */ -div.checker input, -input[type="search"], -input[type="search"]:active { - -moz-appearance: none; - -webkit-appearance: none; -} - -div.selector, -div.selector span, -div.checker span, -div.radio span, -div.uploader, -div.uploader -span.action, -div.button, -div.button span { - -webkit-font-smoothing: antialiased; -} - -div.selector, -div.checker, -div.button, -div.radio, -div.uploader { - display: -moz-inline-box; - display: inline-block; - zoom: 1; - vertical-align: middle; -} - -div.checker span, -div.checker input, -div.radio span, -div.radio input, -div.button span { - display: -moz-inline-box; - display: inline-block; - zoom: 1; - text-align: center; -} - -div.selector select, -div.checker input, -div.button button, -div.button input, -div.button a, -div.radio input, -div.uploader input, -input.uniform-input, -select.uniform-multiselect, -textarea.uniform { - outline: 0; -} - -div.selector, -div.selector *, -div.radio, -div.radio *, -div.checker, -div.checker *, -div.uploader, -div.uploader *, -div.button, -div.button * { - margin: 0; - padding: 0; -} - -/* Select */ -div.selector { - padding: 0 1.9em 0 0; - position: relative; - overflow: hidden; - border: 1px solid; - border-radius: 4px; -} -div.selector span { - text-overflow: ellipsis; - display: block; - overflow: hidden; - white-space: nowrap; - padding:6px 0 6px 10px; - cursor: pointer; - width: 100%; - border-right: 1px solid; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; -} -div.selector .ui-icon { - background: url(img/ui-icons_white.png) -65px -16px; -} -div.selector select { - opacity: 0; - filter: alpha(opacity=0); - border: 0; - background: none; - position: absolute; - height: 50px; - bottom: 0; - width: 100%; - cursor: pointer; -} - -/* Checkbox */ -div.checker { - position: relative; - border: 1px solid; - padding: 1px; - border-radius: 4px; -} -div.checker, -div.checker span, -div.checker input { - width: 15px; - height: 15px; -} -div.checker span.checked { - background: url(img/ui-icons_white.png) -64px -145px; -} -div.checker input { - opacity: 0; - filter: alpha(opacity=0); - border: 0; - background: none; - cursor: pointer; -} - -/* Radio */ -div.radio { - position: relative; - border: 1px solid; - padding: 1px; - border-radius: 9px; -} -div.radio, -div.radio span, -div.radio input { - width: 15px; - height: 15px; -} -div.radio span.checked { - background: url(img/ui-icons_white.png) -80px -145px; -} -div.radio input { - opacity: 0; - border: 0; - background: none; - cursor: pointer; -} - -/* Upload */ -div.uploader { - cursor: pointer; - position: relative; - overflow: hidden; - border-radius: 4px; -} -div.uploader span.action { - text-align: center; - float: left; - display: inline; - overflow: hidden; - cursor: pointer; - padding: 6px 10px; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} -div.uploader span.filename { - text-overflow: ellipsis; - display: block; - overflow: hidden; - white-space: nowrap; - float: left; - padding: 6px 10px; - border-right: 1px solid; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; -} -div.uploader input { - opacity: 0; - filter: alpha(opacity=0); - border: 0; - background: none; - position: absolute; - top: 0; - right: 0; - float: right; - cursor: pointer; - font-size: 100px; -} -div.uploader input::-webkit-file-upload-button { - cursor: pointer; -} -div.uploader.active span.filename, -div.uploader.focus span.filename { - border-right: 1px solid; -} - -/* Button */ -div.button { - cursor: pointer; - position: relative; - overflow: hidden; - border: 1px solid; - border-radius: 4px; -} -div.button a, -div.button button, -div.button input { - opacity: 0; - filter: alpha(opacity=0); - display: block; - left: 0; - top: 0; - position: absolute; - margin: 0; - padding: 0; - font-size: 1000px; - cursor: pointer; -} -div.button span { - padding: 0; - margin: 6px 10px; -} - -/* Text fields */ -input.uniform-input, -select.uniform-multiselect, -textarea.uniform { - margin: 0; - border: 1px solid; - border-radius: 4px; -} -input.uniform-input, -textarea.uniform { - padding: 6px 10px; -} -textarea.uniform { - overflow: auto; -} -select.uniform-multiselect { - padding: 5px; -} - - -/** Colorize elements */ - -div.uploader { - border: 1px solid #6b6b6b; -} -div.uploader.active, -div.uploader.focus { - border-color: #1b79b8; -} - -/* Default - text fields */ -input.uniform-input, -select.uniform-multiselect, -textarea.uniform, -div.uploader span.filename, -div.selector span { - border-color: #6b6b6b; - box-shadow: inset 0 0 4px #6b6b6b; - background: #fff; - background: -webkit-linear-gradient(top, #f0f0f0, #fff); - background: -moz-linear-gradient(top, #f0f0f0, #fff); - background: -ms-linear-gradient(top, #f0f0f0, #fff); - background: -o-linear-gradient(top, #f0f0f0, #fff); - background: linear-gradient(to bottom, #f0f0f0, #fff); - color: #6b6b6b; -} - -select.uniform-multiselect option { - color: #6b6b6b; -} - -select.uniform-multiselect.focus option { - color: #000; -} - -/* Focus - text fields */ -input.uniform-input.focus, -select.uniform-multiselect.focus, -textarea.uniform.focus, -div.uploader.active span.filename, -div.uploader.focus span.filename, -div.selector.active span, -div.selector.focus span { - border-color: #1b79b8; - box-shadow: inset 0 0 4px #1b79b8; - color: #000; - background: #fff; - background: -webkit-linear-gradient(top, #dfeef8, #fff); - background: -moz-linear-gradient(top, #dfeef8, #fff); - background: -ms-linear-gradient(top, #dfeef8, #fff); - background: -o-linear-gradient(top, #dfeef8, #fff); - background: linear-gradient(to bottom, #dfeef8, #fff); -} - -/* Read-only - text fields */ -input.uniform-input[readonly], -textarea.uniform[readonly], -input.uniform-input[readonly]:focus, -textarea.uniform[readonly]:focus { - color: #808080; - border-color: #a5a5a5; - box-shadow: inset 0 0 4px #a5a5a5; - background: -webkit-linear-gradient(top, #ddd, #fff); - background: -moz-linear-gradient(top, #ddd, #fff); - background: -ms-linear-gradient(top, #ddd, #fff); - background: -o-linear-gradient(top, #ddd, #fff); - background: linear-gradient(to bottom, #ddd, #fff); -} - -/* Default - buttons */ -div.selector, -div.button, -div.uploader span.action, -div.radio, -div.checker { - border-color: #6b6b6b; - background: #6b6b6b; - background: -webkit-linear-gradient(top, #ababab, #6b6b6b); - background: -moz-linear-gradient(top, #ababab, #6b6b6b); - background: -ms-linear-gradient(top, #ababab, #6b6b6b); - background: -o-linear-gradient(top, #ababab, #6b6b6b); - background: linear-gradient(to bottom, #ababab, #6b6b6b); - box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; -} - -/* Hover - buttons */ -div.selector.hover, -div.button.hover, -div.uploader.hover span.action, -div.radio.hover, -div.checker.hover { - border-color: #6b6b6b; - background: #6b6b6b; - background: -webkit-linear-gradient(top, #6b6b6b, #ababab); - background: -moz-linear-gradient(top, #6b6b6b, #ababab); - background: -ms-linear-gradient(top, #6b6b6b, #ababab); - background: -o-linear-gradient(top, #6b6b6b, #ababab); - background: linear-gradient(to bottom, #6b6b6b, #ababab); -} - -/* Focus - buttons */ -div.selector.focus, -div.button.focus, -div.uploader.focus span.action, -div.radio.focus, -div.checker.focus { - border-color: #1b79b8; - background: #1b79b8; - background: -webkit-linear-gradient(top, #59b5f2, #1b79b8); - background: -moz-linear-gradient(top, #59b5f2, #1b79b8); - background: -ms-linear-gradient(top, #59b5f2, #1b79b8); - background: -o-linear-gradient(top, #59b5f2, #1b79b8); - background: linear-gradient(to bottom, #59b5f2, #1b79b8); -} - -/* Active - buttons */ -div.button.active, -div.button.active.hover, -div.button.focus.hover, -div.uploader.active span.action, -div.uploader.active.hover span.action, -div.uploader.focus.hover span.action, -div.radio.active, -div.radio.active.hover, -div.radio.focus.hover, -div.checker.active, -div.checker.active.hover, -div.checker.focus.hover, -div.selector.active, -div.selector.active.hover { - border-color: #1b79b8; - background: #1b79b8; - background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); - background: -moz-linear-gradient(top, #1b79b8, #59b5f2); - background: -ms-linear-gradient(top, #1b79b8, #59b5f2); - background: -o-linear-gradient(top, #1b79b8, #59b5f2); - background: linear-gradient(to bottom, #1b79b8, #59b5f2); -} - -/* Disabled */ -input.uniform-input[disabled], -select.uniform-multiselect[disabled], -textarea.uniform[disabled], -div.button.disabled, -div.uploader.disabled, -div.radio.disabled, -div.checker.disabled, -div.selector.disabled, -div.selector.disabled.active{ - opacity: .5; - filter: alpha(opacity=50); - cursor: default; -} - -div.selector.disabled select, -div.uploader.disabled input, -div.button.disabled input, -div.button.disabled button, -div.button.disabled a, -div.radio.disabled input, -div.checker.disabled input { - cursor: default; -} - -/* Buttons text */ -div.button span, -div.uploader span.action { - font-weight: bold; - color: #fff; - text-shadow: - 1px 0 rgba(0,0,0,.2), - -1px 0 rgba(0,0,0,.2), - 0 -1px rgba(0,0,0,.2), - 0 1px rgba(0,0,0,.2), - 1px 1px rgba(0,0,0,.2), - -1px -1px rgba(0,0,0,.2), - 1px -1px rgba(0,0,0,.2), - -1px 1px rgba(0,0,0,.2); -} - -/* Placeholder colors */ -input.uniform-input::-webkit-input-placeholder, -textarea.uniform::-webkit-input-placeholder { - color: #ababab; -} -input.uniform-input:-moz-placeholder, -textarea.uniform::-moz-placeholder { - color: #6b6b6b; -} -input.uniform-input::-moz-placeholder, -textarea.uniform::-moz-placeholder { - color: #6b6b6b; -} -input.uniform-input:-ms-input-placeholder, -textarea.uniform:-ms-input-placeholder{ - color: #ababab; -} -input.uniform-input:focus::-webkit-input-placeholder, -textarea.uniform:focus::-webkit-input-placeholder{ - color: #59b5f2; -} -input.uniform-input:focus:-moz-placeholder, -textarea.uniform:focus:-moz-placeholder { - color: #1b79b8; -} -input.uniform-input:focus::-moz-placeholder, -textarea.uniform:focus::-moz-placeholder { - color: #1b79b8; -} -input.uniform-input:focus:-ms-input-placeholder, -textarea.uniform:focus:-ms-input-placeholder { - color: #59b5f2; -} - -/** sh-uniform elements (a shUniform patch must be applied) */ - -fieldset.sh-uniform { - border: 1px solid #6B6B6B; - box-shadow: inset 0 0 4px #6B6B6B; - border-radius: 4px; - background: #fff; - background: -webkit-linear-gradient(top, #f0f0f0, #fff); - background: -moz-linear-gradient(top, #f0f0f0, #fff); - background: -ms-linear-gradient(top, #f0f0f0, #fff); - background: -o-linear-gradient(top, #f0f0f0, #fff); - background: linear-gradient(to bottom, #f0f0f0, #fff); - margin: 0 10px 10px 0; - padding: 10px; -} -fieldset.sh-uniform legend { - font-weight: bold; - color: #6B6B6B; - text-shadow: - 1px 0 rgba(255,255,255,.5), - -1px 0 rgba(255,255,255,.5), - 0 -1px rgba(255,255,255,.5), - 0 1px rgba(255,255,255,.5), - 1px 1px rgba(255,255,255,.5), - -1px -1px rgba(255,255,255,.5), - 1px -1px rgba(255,255,255,.5), - -1px 1px rgba(255,255,255,.5), - 0 0 5px #fff; -} -label.sh-uniform { - color: #6b6b6b; -} - -/*** shCheckset */ - -.shcs { - margin: 0; -} -.shcs > div { - border: 1px solid; - border-top: 0; - padding: 5px; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; -} -.shcs > input, .shcs > input:focus, .shcs > input:hover { - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - margin:0; -} -.shcs label { - padding: 2px 5px 2px 2px; - border: 1px solid transparent; - border-radius: 4px; - color: #6b6b6b; -} -.shcs > div, .shcs label:hover { - border-color: #6b6b6b; - box-shadow: inset 0 0 4px #6b6b6b; - background: #fff; - background: -webkit-linear-gradient(top, #f0f0f0, #fff); - background: -moz-linear-gradient(top, #f0f0f0, #fff); - background: -ms-linear-gradient(top, #f0f0f0, #fff); - background: -o-linear-gradient(top, #f0f0f0, #fff); - background: linear-gradient(to bottom, #f0f0f0, #fff); -} -.shcs label:hover { - color: #6b6b6b; - cursor: pointer; -} -.shcs > div.focus, .shcs label.checked { - border-color: #1b79b8; - box-shadow: inset 0 0 4px #1b79b8; - color: #000; - background: #fff; - background: -webkit-linear-gradient(top, #dfeef8, #fff); - background: -moz-linear-gradient(top, #dfeef8, #fff); - background: -ms-linear-gradient(top, #dfeef8, #fff); - background: -o-linear-gradient(top, #dfeef8, #fff); - background: linear-gradient(to bottom, #dfeef8, #fff); -} -.shcs label.checked div.checker { - border-color: #1b79b8; - background: #1b79b8; - background: -webkit-linear-gradient(top, #59b5f2, #1b79b8); - background: -moz-linear-gradient(top, #59b5f2, #1b79b8); - background: -ms-linear-gradient(top, #59b5f2, #1b79b8); - background: -o-linear-gradient(top, #59b5f2, #1b79b8); - background: linear-gradient(to bottom, #59b5f2, #1b79b8); -} -.shcs label.checked div.checker.hover { - border-color: #1b79b8; - background: #1b79b8; - background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); - background: -moz-linear-gradient(top, #1b79b8, #59b5f2); - background: -ms-linear-gradient(top, #1b79b8, #59b5f2); - background: -o-linear-gradient(top, #1b79b8, #59b5f2); - background: linear-gradient(to bottom, #1b79b8, #59b5f2); -} - -.shcs div.checker.focus { - border-color: #6b6b6b; - background: #6b6b6b; - background: -webkit-linear-gradient(top, #ababab, #6b6b6b); - background: -moz-linear-gradient(top, #ababab, #6b6b6b); - background: -ms-linear-gradient(top, #ababab, #6b6b6b); - background: -o-linear-gradient(top, #ababab, #6b6b6b); - background: linear-gradient(to bottom, #ababab, #6b6b6b); - box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; -} - -.shcs div.checker.focus.hover { - border-color: #6b6b6b; - background: #6b6b6b; - background: -webkit-linear-gradient(top, #6b6b6b, #ababab); - background: -moz-linear-gradient(top, #6b6b6b, #ababab); - background: -ms-linear-gradient(top, #6b6b6b, #ababab); - background: -o-linear-gradient(top, #6b6b6b, #ababab); - background: linear-gradient(to bottom, #6b6b6b, #ababab); -} - -.shcs label > span { - position:relative; - margin-left:5px; - top:1px; -}* { - font-size: 13px; -} -body { - background: #e0e0e0; - color: #6B6B6B; -} -fieldset td { - white-space: nowrap; -} -#folders { - margin: 5px 5px 0 5px; -} -#files { - margin-right: 5px; -} - - -/* SHARED DECLARATIONS */ - -#toolbar a:hover, -#toolbar a.hover, -span.current, -span.regular:hover, -span.context, -#clipboard div:hover, -div.file:hover, -#files div.selected, -#files div.selected:hover, -tr.selected > td, -tr.selected:hover > td, -#menu .list div a:hover { - color: #fff; - text-shadow: - 1px 0 rgba(0,0,0,.2), - -1px 0 rgba(0,0,0,.2), - 0 -1px rgba(0,0,0,.2), - 0 1px rgba(0,0,0,.2), - 1px 1px rgba(0,0,0,.2), - -1px -1px rgba(0,0,0,.2), - 1px -1px rgba(0,0,0,.2), - -1px 1px rgba(0,0,0,.2); -} - -#files, -#folders, -#toolbar a.selected { - border: 1px solid #6B6B6B; - box-shadow: inset 0 0 4px #6B6B6B; - border-radius: 4px; - background: #fff; - background: -webkit-linear-gradient(top, #f0f0f0, #fff); - background: -moz-linear-gradient(top, #f0f0f0, #fff); - background: -ms-linear-gradient(top, #f0f0f0, #fff); - background: -o-linear-gradient(top, #f0f0f0, #fff); - background: linear-gradient(to bottom, #f0f0f0, #fff); -} - -/* TOOLBAR */ - -#toolbar { - padding: 5px 0; -} -#toolbar a { - color: #6b6b6b; - margin-right: 5px; - border: 1px solid transparent; - outline: none; - display: block; - float: left; - border-radius: 4px; - transition: .3s; - padding:0; - background: #E0E0E0; -} -#toolbar a > span { - padding: 6px 10px 6px 26px; - diaplay: block; - float:left; - background: no-repeat 6px center; -} -#toolbar a:hover, -#toolbar a.hover { - border-color: #1b79b8; - background: #1b79b8; - background: -webkit-linear-gradient(top, #59b5f2, #1b79b8); - background: -moz-linear-gradient(top, #59b5f2, #1b79b8); - background: -ms-linear-gradient(top, #59b5f2, #1b79b8); - background: -o-linear-gradient(top, #59b5f2, #1b79b8); - background: linear-gradient(to bottom, #59b5f2, #1b79b8); - box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; -} -#toolbar a:hover, -#toolbar a.hover { - transition: .3s; -} -#toolbar a[href="kcact:upload"] span { - background-image: url(img/icons/upload.png); -} -#toolbar a[href="kcact:refresh"] span { - background-image: url(img/icons/refresh.png); -} -#toolbar a[href="kcact:settings"] span { - background-image: url(img/icons/settings.png); -} -#toolbar a[href="kcact:about"] span { - background-image: url(img/icons/about.png); -} -#toolbar a[href="kcact:maximize"] span { - background-image: url(img/icons/maximize.png); -} - - -/* SETTINGS BAR */ - -#settings label { - cursor: pointer; -} -#settings fieldset { - margin-right:5px; - margin-bottom: 6px; - margin-top:-5px; - padding:6px; -} -#settings fieldset:hover { - border-color: #1b79b8; - box-shadow: inset 0 0 4px #1b79b8; - background: #dfeef8; - background: -webkit-linear-gradient(top, #dfeef8, #fff); - background: -moz-linear-gradient(top, #dfeef8, #fff); - background: -ms-linear-gradient(top, #dfeef8, #fff); - background: -o-linear-gradient(top, #dfeef8, #fff); - background: linear-gradient(to bottom, #dfeef8, #fff); -} -#settings fieldset:hover legend, -#settings fieldset:hover label { - color: #215b82; -} - - -/* FOLDERS */ - -div.folder { - padding-top: 2px; - margin-top: 4px; - white-space: nowrap; -} -div.folder a { - text-decoration: none; - cursor: default; - outline: none; - color: #6b6b6b; -} -span.folder { - padding: 2px 3px 2px 23px; - outline: none; - background: no-repeat 3px center; - cursor: pointer; - border-radius: 3px; - border: 1px solid transparent; -} -span.brace { - width: 16px; - height: 16px; - outline: none; -} -span.current { - transition: .3s; - background-image: url(img/tree/folder.png); - background-color: #3b98d6; - border-color: #3b98d6; - box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; -} -span.regular { - transition: .3s; - background-image: url(img/tree/folder.png); - background-color: transparent; -} -span.regular:hover, span.context, #clipboard div:hover { - transition: .3s; - background-color: #c6c6c6; - border-color: #c6c6c6; - box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; -} -span.opened { - background-image: url(img/tree/minus.png); -} -span.closed { - background-image: url(img/tree/plus.png); -} -span.denied { - background-image: url(img/tree/denied.png); -} - - -/* FILES */ - -div.file { - padding: 4px; - margin: 3px; - border: 1px solid transparent; - border-radius: 4px; -} -div.file:hover { - border-color: #aaa; - box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; - background: #c6c6c6; - background: -webkit-linear-gradient(top, #e7e7e7, #c6c6c6); - background: -moz-linear-gradient(top, #e7e7e7, #c6c6c6); - background: -ms-linear-gradient(top, #e7e7e7, #c6c6c6); - background: -o-linear-gradient(top, #e7e7e7, #c6c6c6); - background: linear-gradient(to bottom, #e7e7e7, #c6c6c6); -} -div.file .name { - margin-top: 4px; - font-weight: bold; - height: 16px; - overflow: hidden; - padding-bottom: 2px; -} -div.file .time { - font-size: 10px; -} -div.file .size { - font-size: 10px; -} -#files div.selected, -#files div.selected:hover { - border-color: #3b98d6; - background: #3b98d6; - background: -webkit-linear-gradient(top, #7dc2f2, #3b98d6); - background: -moz-linear-gradient(top, #7dc2f2, #3b98d6); - background: -ms-linear-gradient(top, #7dc2f2, #3b98d6); - background: -o-linear-gradient(top, #7dc2f2, #3b98d6); - background: linear-gradient(to bottom, #7dc2f2, #3b98d6); - box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; -} -tr.file > td { - padding: 3px 4px; -} -tr.file:hover > td { - background-color: #ddebf8; - transition: none; -} -tr.selected > td, -tr.selected:hover > td { - transition: .3s; - background-color: #5b9bda; -} -tr.file td.name { - background-position: 2px center; - padding-left: 22px; -} -a.denied { - color: #666; - opacity: 0.5; - filter: alpha(opacity:50); - cursor: default; -} -a.denied:hover { - background-color: #e4e3e2; - border-color: transparent; - box-shadow: none; -} - -/* FILE MENU */ - -#menu .ui-menu a span { - background: left center no-repeat; - padding-left: 20px; - white-space: nowrap; -} -#menu a[href="kcact:refresh"] span { - background-image: url(img/icons/refresh.png); -} -#menu a[href="kcact:mkdir"] span { - background-image: url(img/icons/folder-new.png); -} -#menu a[href="kcact:mvdir"] span, #menu a[href="kcact:mv"] span { - background-image: url(img/icons/rename.png); -} -#menu a[href="kcact:rmdir"] span, #menu a[href="kcact:rm"] span, #menu a[href="kcact:rmcbd"] span { - background-image: url(img/icons/delete.png); -} -#menu a[href="kcact:clpbrdadd"] span { - background-image: url(img/icons/clipboard-add.png); -} -#menu a[href="kcact:pick"] span, #menu a[href="kcact:pick_thumb"] span { - background-image: url(img/icons/select.png); -} -#menu a[href="kcact:download"] span { - background-image: url(img/icons/download.png); -} -#menu a[href="kcact:view"] span { - background-image: url(img/icons/view.png); -} -#menu a[href="kcact:cpcbd"] span { - background-image: url(img/icons/copy.png); -} -#menu a[href="kcact:mvcbd"] span { - background-image: url(img/icons/move.png); -} -#menu a[href="kcact:clrcbd"] span { - background-image: url(img/icons/clipboard-clear.png); -} - -/* CLIPBOARD */ - -#clipboard { - margin-left:-3px; - padding: 2px; -} -#clipboard div { - background: url(img/icons/clipboard.png) no-repeat center center; - border: 1px solid transparent; - padding: 2px; - cursor: pointer; - border-radius: 4px; -} -#clipboard.selected div, #clipboard.selected div:hover { - background-color: #3b98d6; - border-color: #3b98d6; - box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; -} -#menu .list a, #menu .list a.ui-state-focus { - margin: -1px 0 0 -1px; - padding: 6px 10px; - border: 1px solid transparent; - background: none; - border-radius: 0; - text-shadow: none; - box-shadow: none; - color: #6b6b6b; -} -#menu .list a.first, #menu .list a.first.ui-state-focus { - border-radius: 4px 4px 0 0; -} -#menu .list a:hover { - border-color: #1b79b8; - background: #1b79b8; - background: -webkit-linear-gradient(top, #1b79b8, #59b5f2); - background: -moz-linear-gradient(top, #1b79b8, #59b5f2); - background: -ms-linear-gradient(top, #1b79b8, #59b5f2); - background: -o-linear-gradient(top, #1b79b8, #59b5f2); - background: linear-gradient(to bottom, #1b79b8, #59b5f2); - box-shadow: inset 0 0 7px #fff, inset 0 0 3px #fff; -} -#menu .list { - overflow:hidden; - max-height: 1px; - margin-bottom: -1px; - padding-bottom:1px; -} -#menu li.div-files { - margin: 0 0 1px 0; -} - -/* ABOUT DIALOG */ - -.about { - text-align: center; -} -.about div.head { - font-weight: bold; - font-size: 12px; - padding: 3px 0 8px 0; -} -.about div.head a { - background: url(img/kcf_logo.png) no-repeat left center; - padding: 0 0 0 27px; - font-size: 17px; - outline: none; -} - -.about a { - text-decoration: none; - color: #0055ff; -} - -.about a:hover { - text-decoration: underline; -} -#checkver { - margin: 5px 0 10px 0; -} -#loading, #checkver > span.loading { - background: url(img/loading.gif); - border: 1px solid #3687e2; - box-shadow: 0 0 3px #3687e2, inset 0 0 4px #fff, inset 0 0 5px #fff; - padding: 6px 10px; - border-radius: 4px; -} -#checkver a { - font-weight: normal; - padding: 3px 3px 3px 20px; - background: url(img/icons/download.png) no-repeat left center; -} - -/* IMAGE VIEWER */ - -.ui-dialog-content.kcfImageViewer { - background: #000; - cursor: pointer; -} -.kcfImageViewer .img { - background: url(img/bg_transparent.png); -} - -/* MISC */ - -#loading { - margin-right: 5px; -} -#loadingDirs { - padding: 5px 0 1px 24px; -} -#files.drag { - background: #ddebf8; -} - -/* FIX FIELDSET BORDER RADIUS BUG ON IE */ -body.msie fieldset, -body.trident.rv fieldset { - border-radius: 0; -} \ No newline at end of file diff --git a/third_party/kcfinder/cache/theme_default.js b/third_party/kcfinder/cache/theme_default.js deleted file mode 100644 index 518f854115b..00000000000 --- a/third_party/kcfinder/cache/theme_default.js +++ /dev/null @@ -1 +0,0 @@ -new Image().src = 'themes/default/img/loading.gif'; // preload animated gif diff --git a/tmp/runtime/URI/4.6.0,0962962aa5b15c247bce765d59cd78344a488eaf,1.ser b/tmp/runtime/URI/4.6.0,0962962aa5b15c247bce765d59cd78344a488eaf,1.ser deleted file mode 100644 index f6d3e812b706751db73261e535cbc8e9e3632a7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 516 zcmZvYK~BRk5Jh{IS+Yt}Krr4Rgjxw&L}48{?YOb(CXww3N|n1ab|OkkcJ}Cd-t%8# zc8f53e|dgwtyY?B{_!?{B&93ubzK48;nCqWfHw6XBF52$QRc(#Df@AS7lX zn{r}SJO5zhdS|rrAeJ~Cp*+Qh`FWO6J+G4c$QxP5j4Yyy6GCEw$1a*S3aRa z#S<7y6` From f1d0555f1e65482eb903e2b4ad2d0f3402d934a7 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Wed, 27 Apr 2016 17:11:15 +0200 Subject: [PATCH 061/133] Dev: flush OP cache after update --- application/controllers/admin/update.php | 3 ++- application/views/admin/update/updater/steps/_final.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/application/controllers/admin/update.php b/application/controllers/admin/update.php index 1a9268b6fa4..ceb5a88eb4d 100755 --- a/application/controllers/admin/update.php +++ b/application/controllers/admin/update.php @@ -293,7 +293,8 @@ function step4() Yii::app()->session['security_update'] = null; $today = new DateTime("now"); Yii::app()->session['next_update_check'] = $today->add(new DateInterval('PT6H')); - + Yii::app()->cache->flush(); + opcache_reset(); // TODO : aData should contains information about each step return $this->controller->renderPartial('update/updater/steps/_final', array('destinationBuild'=>$destinationBuild), false, false); } diff --git a/application/views/admin/update/updater/steps/_final.php b/application/views/admin/update/updater/steps/_final.php index 98847d2ff4f..de2db3036ad 100644 --- a/application/views/admin/update/updater/steps/_final.php +++ b/application/views/admin/update/updater/steps/_final.php @@ -3,6 +3,8 @@ * This view display the result of the update * @var int $destinationBuild the destination build */ +Yii::app()->cache->flush(); +opcache_reset(); ?>

          From fbb35ff889491749585f7b2d9fcbb7002ac6683d Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Tue, 10 May 2016 17:32:47 +0200 Subject: [PATCH 062/133] Fixed issue #11145: PHP memory_limit being set too low even though php.in defines a higher one --- application/core/LSYii_Controller.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/core/LSYii_Controller.php b/application/core/LSYii_Controller.php index 024f16aca1a..b476c40d16b 100644 --- a/application/core/LSYii_Controller.php +++ b/application/core/LSYii_Controller.php @@ -99,7 +99,10 @@ protected function _init() throw new CException($dieoutput); if (ini_get("max_execution_time") < 1200) @set_time_limit(1200); // Maximum execution time - works only if safe_mode is off - if ((int)substr(ini_get("memory_limit"),0,-1) < (int) Yii::app()->getConfig('memory_limit')) @ini_set("memory_limit",Yii::app()->getConfig('memory_limit').'M'); // Set Memory Limit for big surveys + if (ini_get('memory_limit')!=-1 && convertPHPSizeToBytes(ini_get("memory_limit"))getConfig('memory_limit').'M')) + { + @ini_set("memory_limit",Yii::app()->getConfig('memory_limit').'M'); // Set Memory Limit for big surveys + } // The following function (when called) includes FireBug Lite if true defined('FIREBUG') or define('FIREBUG' , Yii::app()->getConfig('use_firebug_lite')); From e71c855441743cba3fb8dd1cb6b4699a324db2f2 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Thu, 12 May 2016 10:43:43 +0200 Subject: [PATCH 063/133] Fixed issue #9966: Unable to export result as PDF --- application/helpers/admin/export/PdfWriter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/helpers/admin/export/PdfWriter.php b/application/helpers/admin/export/PdfWriter.php index 6a953204eba..69d4d7d2628 100644 --- a/application/helpers/admin/export/PdfWriter.php +++ b/application/helpers/admin/export/PdfWriter.php @@ -62,7 +62,7 @@ public function outputRecord($headers, $values, FormattingOptions $oOptions) { if ($gid != 0) { - $this->pdf->addGidAnswer($questions[0]['group_name']); + $this->pdf->addGidAnswer($questions[0]['group_name'],''); } foreach ($questions as $question) { From 8447b6359d6a5db7fc4958e91fce2ed75a0cc41f Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Thu, 12 May 2016 10:47:57 +0200 Subject: [PATCH 064/133] Dev Removede opcache_reset and wrong updater URL --- application/config/updater_version.php | 1 - application/controllers/admin/update.php | 1 - application/views/admin/update/updater/steps/_final.php | 1 - 3 files changed, 3 deletions(-) diff --git a/application/config/updater_version.php b/application/config/updater_version.php index 02ad1b5ca0c..03891b01bb6 100644 --- a/application/config/updater_version.php +++ b/application/config/updater_version.php @@ -17,7 +17,6 @@ $config['updaterversion'] = 6; $config['comfort_update_server_url'] = 'comfortupdate.limesurvey.org/'; -//$config['comfort_update_server_url'] = 'web.comfortupdate.org/'; $config['comfort_update_server_ssl'] = 0; return $config; diff --git a/application/controllers/admin/update.php b/application/controllers/admin/update.php index ceb5a88eb4d..394bff48b4e 100755 --- a/application/controllers/admin/update.php +++ b/application/controllers/admin/update.php @@ -294,7 +294,6 @@ function step4() $today = new DateTime("now"); Yii::app()->session['next_update_check'] = $today->add(new DateInterval('PT6H')); Yii::app()->cache->flush(); - opcache_reset(); // TODO : aData should contains information about each step return $this->controller->renderPartial('update/updater/steps/_final', array('destinationBuild'=>$destinationBuild), false, false); } diff --git a/application/views/admin/update/updater/steps/_final.php b/application/views/admin/update/updater/steps/_final.php index de2db3036ad..3041c47ddb8 100644 --- a/application/views/admin/update/updater/steps/_final.php +++ b/application/views/admin/update/updater/steps/_final.php @@ -4,7 +4,6 @@ * @var int $destinationBuild the destination build */ Yii::app()->cache->flush(); -opcache_reset(); ?>

          From 6bc45f2e7806d51d887705efd0f2f9f343d1660b Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Thu, 12 May 2016 10:50:48 +0200 Subject: [PATCH 065/133] Release 2.06+LTS Build 160511 --- docs/release_notes.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/release_notes.txt b/docs/release_notes.txt index 36ec16caccc..f62b1883353 100644 --- a/docs/release_notes.txt +++ b/docs/release_notes.txt @@ -60,6 +60,15 @@ CHANGE LOG ------------------------------------------------------ +Changes from 2.06LTS (build 160417) to 2.06LTS (build 160511) May 12, 2016 +-Fixed issue #10474: Characters not accepted for "save & resume later" passwords in links sent by email (Carsten Schmitz) +-Fixed issue #10846: Checked responses are not read when load "surveys file" (Denis Chenu) +-Fixed issue #10975: "Please wait connecting to server" is not changing in darkblue theme (LouisGac) +-Fixed issue #10996: If an invalid admin theme is set (e.g. after upgrade) the global settings are not properly read (Carsten Schmitz) +-Fixed issue #11145: PHP memory_limit being set too low even though php.in defines a higher one (Carsten Schmitz) +-Fixed issue #9966: Unable to export result as PDF (Carsten Schmitz) +-Fixed issue : Bad link for Browse uploaded ressources if publicurl is set (Denis Chenu) + Changes from 2.06LTS (build 160329) to 2.06LTS (build 160417) April 17, 2016 -Fixed issue #10222: Attachments for registration emails don't get attached (Carsten Schmitz) -Fixed issue #10474: Some characters not accepted for "save & resume later" passwords in links sent by email (Carsten Schmitz) From e9e664c64aa7636b78c26fedbe305e30c0ee6e46 Mon Sep 17 00:00:00 2001 From: Denis Chenu Date: Fri, 13 May 2016 17:59:09 +0200 Subject: [PATCH 066/133] Fixed issue #11163: Survey response marked as 'finished' after opening email link/password twice Dev: this time the precedent fix is fixed : only when reload answer directly via DB --- application/helpers/expressions/em_core_helper.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/application/helpers/expressions/em_core_helper.php b/application/helpers/expressions/em_core_helper.php index 78cb9da0b98..4e5f90108d0 100644 --- a/application/helpers/expressions/em_core_helper.php +++ b/application/helpers/expressions/em_core_helper.php @@ -269,9 +269,12 @@ private function RDP_EvaluateBinary(array $token) $this->RDP_AddError(gT("Invalid value(s) on the stack"), $token); return false; } - - $bNumericArg1 = !$arg1[0] || strval(floatval($arg1[0]))===strval($arg1[0]); - $bNumericArg2 = !$arg2[0] || strval(floatval($arg2[0]))===strval($arg2[0]); + /* When value come from DB : it's set to 1.000000 (DECIMAL) : must be fixed see #11163. Response::model() must fix this . or not ? */ + /* Don't return true always : user can entre non numeric value in a numeric value : we must compare as string then */ + $arg1[0]=($arg1[2]=="NUMBER" && strpos($arg1[0],".")) ? rtrim(rtrim($arg1[0],"0"),".") : $arg1[0]; + $arg2[0]=($arg2[2]=="NUMBER" && strpos($arg2[0],".")) ? rtrim(rtrim($arg2[0],"0"),".") : $arg2[0]; + $bNumericArg1 = $arg1[0]==='' || strval(floatval($arg1[0]))===$arg1[0]; + $bNumericArg2 = $arg2[0]==='' || strval(floatval($arg2[0]))===$arg2[0]; $bStringArg1 = !$arg1[0] || !$bNumericArg1; $bStringArg2 = !$arg1[0] || !$bNumericArg2; @@ -283,7 +286,7 @@ private function RDP_EvaluateBinary(array $token) // Set bBothString if one is forced to be string, only if both can be numeric. Mimic JS and PHP // Not sure if needed to test if [2] is set. : TODO review if($bBothNumeric){ - $aForceStringArray=array('DQ_STRING','DS_STRING','STRING');// Question can return NUMERIC or WORD : DQ and DS is string entered by user, STRING is a result of a String function + $aForceStringArray=array('DQ_STRING','DS_STRING','STRING');// Question can return NUMBER or WORD : DQ and DS is string entered by user, STRING is a result of a String function if( (isset($arg1[2]) && in_array($arg1[2],$aForceStringArray) || (isset($arg2[2]) && in_array($arg2[2],$aForceStringArray)) ) ) { $bBothNumeric=false; @@ -341,7 +344,7 @@ private function RDP_EvaluateBinary(array $token) $result = array(false,$token[1],'NUMBER'); } else { - // Need this explicit comparison in order to be in agreement with JavaScript + // Need this explicit comparison in order to be in agreement with JavaScript : still needed since we use ==='' ? if (($arg1[0] == '0' && $arg2[0] == '') || ($arg1[0] == '' && $arg2[0] == '0')) { $result = array(false,$token[1],'NUMBER'); } From 897e91abf93b19124d60931b87ac092d1298e40b Mon Sep 17 00:00:00 2001 From: Denis Chenu Date: Mon, 16 May 2016 19:33:05 +0200 Subject: [PATCH 067/133] Fixed issue #11195: Expression Manager : bad comparaison with numeric value Dev: set to strval, else real float is invalid --- application/helpers/expressions/em_core_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/helpers/expressions/em_core_helper.php b/application/helpers/expressions/em_core_helper.php index 4e5f90108d0..cfe4c657e14 100644 --- a/application/helpers/expressions/em_core_helper.php +++ b/application/helpers/expressions/em_core_helper.php @@ -273,8 +273,8 @@ private function RDP_EvaluateBinary(array $token) /* Don't return true always : user can entre non numeric value in a numeric value : we must compare as string then */ $arg1[0]=($arg1[2]=="NUMBER" && strpos($arg1[0],".")) ? rtrim(rtrim($arg1[0],"0"),".") : $arg1[0]; $arg2[0]=($arg2[2]=="NUMBER" && strpos($arg2[0],".")) ? rtrim(rtrim($arg2[0],"0"),".") : $arg2[0]; - $bNumericArg1 = $arg1[0]==='' || strval(floatval($arg1[0]))===$arg1[0]; - $bNumericArg2 = $arg2[0]==='' || strval(floatval($arg2[0]))===$arg2[0]; + $bNumericArg1 = $arg1[0]==='' || strval(floatval($arg1[0]))==strval($arg1[0]); + $bNumericArg2 = $arg2[0]==='' || strval(floatval($arg2[0]))===strval($arg2[0]); $bStringArg1 = !$arg1[0] || !$bNumericArg1; $bStringArg2 = !$arg1[0] || !$bNumericArg2; From e4b11cdd82aa431075a9820d20842d3b6ee1d0ff Mon Sep 17 00:00:00 2001 From: Sam Mousa Date: Thu, 19 May 2016 11:51:26 +0200 Subject: [PATCH 068/133] Fixed issue #10749: When changing the text area the map and hidden value get updated as well. Dev: Also improved loading over secure connections by utilizing protocol agnostic urls. --- application/helpers/qanda_helper.php | 6 ++---- scripts/map.js | 26 ++++++++++++++++++-------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/application/helpers/qanda_helper.php b/application/helpers/qanda_helper.php index 360ef2b3b62..8a74edb9601 100644 --- a/application/helpers/qanda_helper.php +++ b/application/helpers/qanda_helper.php @@ -3522,10 +3522,8 @@ class=\"mapservice\" value = \"{$aQuestionAttributes['location_mapservice']}\" > "; Yii::app()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts')."map.js"); - if ($aQuestionAttributes['location_mapservice']==1 && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off") - Yii::app()->getClientScript()->registerScriptFile("https://maps.googleapis.com/maps/api/js?sensor=false$sGoogleMapsAPIKey"); - else if ($aQuestionAttributes['location_mapservice']==1) - Yii::app()->getClientScript()->registerScriptFile("http://maps.googleapis.com/maps/api/js?sensor=false$sGoogleMapsAPIKey"); + if ($aQuestionAttributes['location_mapservice']==1) + Yii::app()->getClientScript()->registerScriptFile("//maps.googleapis.com/maps/api/js?sensor=false$sGoogleMapsAPIKey"); elseif ($aQuestionAttributes['location_mapservice']==2) Yii::app()->getClientScript()->registerScriptFile("http://www.openlayers.org/api/OpenLayers.js"); diff --git a/scripts/map.js b/scripts/map.js index a8c99fbeca7..bd6d4c58185 100644 --- a/scripts/map.js +++ b/scripts/map.js @@ -52,23 +52,23 @@ function OSGeoInitialize(question,latLng){ if(isNaN(MapOption.longitude) || MapOption.longitude==""){ MapOption.longitude=0; } - var mapquestOSM = L.tileLayer("http://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png", { + var mapquestOSM = L.tileLayer("//{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png", { maxZoom: 19, subdomains: ["otile1", "otile2", "otile3", "otile4"], - attribution: 'Tiles courtesy of MapQuest. Map data © OpenStreetMap contributors, CC-BY-SA.' + attribution: 'Tiles courtesy of MapQuest. Map data © OpenStreetMap contributors, CC-BY-SA.' }); - var mapquestOAM = L.tileLayer("http://{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg", { + var mapquestOAM = L.tileLayer("//{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg", { maxZoom: 10, subdomains: ["oatile1", "oatile2", "oatile3", "oatile4"], - attribution: 'Tiles courtesy of MapQuest. Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency' + attribution: 'Tiles courtesy of MapQuest. Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency' }); - var mapquestHYB = L.layerGroup([L.tileLayer("http://{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg", { + var mapquestHYB = L.layerGroup([L.tileLayer("//{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg", { maxZoom: 10, subdomains: ["oatile1", "oatile2", "oatile3", "oatile4"] - }), L.tileLayer("http://{s}.mqcdn.com/tiles/1.0.0/hyb/{z}/{x}/{y}.png", { + }), L.tileLayer("//{s}.mqcdn.com/tiles/1.0.0/hyb/{z}/{x}/{y}.png", { maxZoom: 19, subdomains: ["oatile1", "oatile2", "oatile3", "oatile4"], - attribution: 'Labels courtesy of MapQuest. Map data © OpenStreetMap contributors, CC-BY-SA. Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency' + attribution: 'Labels courtesy of MapQuest. Map data © OpenStreetMap contributors, CC-BY-SA. Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency' })]); var baseLayers = { @@ -178,7 +178,7 @@ function OSGeoInitialize(question,latLng){ appendTo: $("#searchbox_"+name).parent(), source: function( request, response ) { $.ajax({ - url: "http://api.geonames.org/searchJSON", + url: "//api.geonames.org/searchJSON", dataType: "jsonp", data: { username : LSmap.geonameUser, @@ -293,6 +293,16 @@ function GMapsInitialize(question,lat,lng) { geocodeAddress(name, event.latLng); $("#answer"+question).val(Math.round(event.latLng.lat()*10000)/10000 + " " + Math.round(event.latLng.lng()*10000)/10000); }); + + $("#answer"+question).on('input', function() { + var c = $("#answer"+question).val().split(" "); + if (c.length === 2) { + var latLng = new google.maps.LatLng(c[0], c[1]); + map.panTo(latLng); + marker.setPosition(latLng); + geocodeAddress(name, latLng); + } + }); } // Reset map when shown by conditions From fa6a8013ec0fd6b2baffc43737cef6af8106a421 Mon Sep 17 00:00:00 2001 From: Denis Chenu Date: Thu, 19 May 2016 16:02:57 +0200 Subject: [PATCH 069/133] Fixed issue #10986: Plugin survey setting type "checkbox" does not properly save Dev: cherry-pick have conflict ... --- .../extensions/SettingsWidget/SettingsWidget.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/application/extensions/SettingsWidget/SettingsWidget.php b/application/extensions/SettingsWidget/SettingsWidget.php index 77e74a82bf6..42c9e4889ac 100644 --- a/application/extensions/SettingsWidget/SettingsWidget.php +++ b/application/extensions/SettingsWidget/SettingsWidget.php @@ -3,7 +3,7 @@ class SettingsWidget extends CWidget { protected static $counter = 0; - + public $action; /** * @@ -178,7 +178,7 @@ protected function renderSettings() public function run() { parent::run(); - + // Render settings $this->renderSettings(); // Render buttons @@ -288,7 +288,7 @@ public function renderBoolean($name, array $metaData, $form = null) public function renderCheckbox($name, array $metaData, $form = null) { - $htmlOptions = $this->htmlOptions($metaData,$form); + $htmlOptions = $this->htmlOptions($metaData,$form,array('uncheckValue'=>false)); $value = isset($metaData['current']) ? (bool) $metaData['current'] : false; return CHtml::checkBox($name, $value,$htmlOptions); } @@ -317,7 +317,7 @@ public function renderHtml($name, array $metaData, $form = null) ), true) ); } - + public function renderInfo($name, array $metaData, $form = null) { $value = isset($metaData['content']) ? $metaData['content'] : ''; @@ -357,14 +357,14 @@ public function renderLogo($name, array $metaData, $form = null) $htmlOptions = $this->htmlOptions($metaData); return CHtml::image($metaData['path'],$alt,$htmlOptions); } - + public function renderRadio($name, array $metaData, $form = null) { $value = isset($metaData['current']) ? $metaData['current'] : (isset($metaData['default']) ? $metaData['default'] : null); $htmlOptions = $this->htmlOptions($metaData,$form); return CHtml::radioButtonList($name, $value, $metaData['options'],$htmlOptions); } - + public function renderRelevance($name, array $metaData, $form = null) { $metaData['class'][] = 'relevance'; @@ -448,7 +448,7 @@ public function renderList($name, array $metaData, $form = null) unset($itemMetaData['label']); $itemMetaData['controlOptions']['class']=(isset($itemMetaData['controlOptions']['class']))?$itemMetaData['controlOptions']['class']:'default'; //$cells .= CHtml::tag('td', array(), $this->renderSetting($itemName . '[]', $itemMetaData, $form, true,false)); - // TODO $itemMetaData['htmlOtions']['id']=$itemName.$key or something like this + // TODO $itemMetaData['htmlOtions']['id']=$itemName.$key or something like this $cells .= $this->renderSetting($itemName . '[]', $itemMetaData, $form, true,'td'); } $headers .= CHtml::tag('th'); @@ -458,7 +458,7 @@ public function renderList($name, array $metaData, $form = null) array('icon' => 'icon-minus', 'htmlOptions' => array('class' => 'remove')), array('icon' => 'icon-plus', 'htmlOptions' => array('class' => 'add')), ) - + ), true)); $out .= CHtml::openTag('table',array('class'=>'settings activecell')); // Create header row. From 03e5c55cdf88a8f5963777e547b14063355e51b6 Mon Sep 17 00:00:00 2001 From: Alfredo Esteban Date: Sat, 21 May 2016 18:37:27 +0200 Subject: [PATCH 070/133] Fixed issue #10104: failed authentication with LDAP shows "success" message --- application/core/plugins/AuthLDAP/AuthLDAP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/core/plugins/AuthLDAP/AuthLDAP.php b/application/core/plugins/AuthLDAP/AuthLDAP.php index 66475e41585..2bd709952d4 100644 --- a/application/core/plugins/AuthLDAP/AuthLDAP.php +++ b/application/core/plugins/AuthLDAP/AuthLDAP.php @@ -480,7 +480,7 @@ public function newUserSession() { // if no entry or more than one entry returned // then deny authentication - $this->setAuthFailure(100, ldap_error($ldapconn)); + $this->setAuthFailure(self::ERROR_USERNAME_INVALID); ldap_close($ldapconn); // all done? close connection return; } From cf5f9f669075839bf26f50c9f143ba412cbd4a14 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Wed, 25 May 2016 08:47:46 +0200 Subject: [PATCH 071/133] Release 2.50+ Build 160524 --- docs/release_notes.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/release_notes.txt b/docs/release_notes.txt index f62b1883353..c2019d982db 100644 --- a/docs/release_notes.txt +++ b/docs/release_notes.txt @@ -59,6 +59,12 @@ Thank you to everyone who helped with this new release! CHANGE LOG ------------------------------------------------------ +Changes from 2.06LTS (build 160511) to 2.06LTS (build 160524) May 24, 2016 +-Fixed issue #10104: Failed authentication with LDAP shows "success" message (Alfredo Esteban) +-Fixed issue #10749: When changing the text area the map and hidden value get updated as well. (Sam Mousa) +-Fixed issue #10986: Plugin survey setting type "checkbox" does not properly save (Denis Chenu) +-Fixed issue #11163: Survey response marked as 'finished' after opening email link/password twice (Denis Chenu) +-Fixed issue #11195: Expression Manager: Bad comparison with numeric value (Denis Chenu) Changes from 2.06LTS (build 160417) to 2.06LTS (build 160511) May 12, 2016 -Fixed issue #10474: Characters not accepted for "save & resume later" passwords in links sent by email (Carsten Schmitz) From d03e78281ba0da048cb4d00a65adc42f987e9396 Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Thu, 26 May 2016 15:32:21 +0200 Subject: [PATCH 072/133] Fixed issue : Google Analytics code not running Dev: missing space for EM --- application/helpers/replacements_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/helpers/replacements_helper.php b/application/helpers/replacements_helper.php index a53de868925..a94f30129e9 100644 --- a/application/helpers/replacements_helper.php +++ b/application/helpers/replacements_helper.php @@ -500,8 +500,8 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de $_trackURL = htmlspecialchars($thissurvey['name'] . '-[' . $surveyid . ']/[' . $gseq . ']-' . $_groupname); $_googleAnalyticsJavaScript = << -(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ -(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), +(function(i,s,o,g,r,a,m){ i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ +(i[r].q=i[r].q||[]).push(arguments) },i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); From d171156cc67a1abae6471a24788cdd67be05f666 Mon Sep 17 00:00:00 2001 From: Sam Mousa Date: Mon, 6 Jun 2016 10:13:38 +0200 Subject: [PATCH 073/133] Dev fixed PHP4-style constructor throwing deprecated notice on PHP7 --- application/third_party/pclzip/pclzip.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/third_party/pclzip/pclzip.lib.php b/application/third_party/pclzip/pclzip.lib.php index 4bf05a52365..c0ef61681d1 100644 --- a/application/third_party/pclzip/pclzip.lib.php +++ b/application/third_party/pclzip/pclzip.lib.php @@ -212,7 +212,7 @@ class PclZip // Note that no real action is taken, if the archive does not exist it is not // created. Use create() for that. // -------------------------------------------------------------------------------- - function PclZip($p_zipname) + public function __construct($p_zipname) { // ----- Tests the zlib From 75c465c1e26e39005b754899fba44ec7688ae04f Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Fri, 10 Jun 2016 15:22:09 +0200 Subject: [PATCH 074/133] Fixed issue #10952: Conditions do not show up in conditions designer after creation if using MSSQL and connecting from Linux using FreeTDS --- .../controllers/admin/conditionsaction.php | 121 +++++++++--------- 1 file changed, 60 insertions(+), 61 deletions(-) diff --git a/application/controllers/admin/conditionsaction.php b/application/controllers/admin/conditionsaction.php index 7de7931e002..7fc20d9e541 100644 --- a/application/controllers/admin/conditionsaction.php +++ b/application/controllers/admin/conditionsaction.php @@ -12,12 +12,12 @@ * */ /** -* Condition Controller +* Condition Controller * * This controller performs token actions * -* @package LimeSurvey -* @subpackage Backend +* @package LimeSurvey +* @subpackage Backend */ class conditionsaction extends Survey_Common_Action { @@ -64,17 +64,17 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) if (Yii::app()->getConfig('stringcomparizonoperators') == 1) { $method = array( - "<" => gT("Less than"), - "<=" => gT("Less than or equal to"), - "==" => gT("equals"), - "!=" => gT("Not equal to"), - ">=" => gT("Greater than or equal to"), - ">" => gT("Greater than"), - "RX" => gT("Regular expression"), - "a gT("Less than (Strings)"), - "a<=b" => gT("Less than or equal to (Strings)"), - "a>=b" => gT("Greater than or equal to (Strings)"), - "a>b" => gT("Greater than (Strings)") + "<" => gT("Less than"), + "<=" => gT("Less than or equal to"), + "==" => gT("equals"), + "!=" => gT("Not equal to"), + ">=" => gT("Greater than or equal to"), + ">" => gT("Greater than"), + "RX" => gT("Regular expression"), + "a gT("Less than (Strings)"), + "a<=b" => gT("Less than or equal to (Strings)"), + "a>=b" => gT("Greater than or equal to (Strings)"), + "a>b" => gT("Greater than (Strings)") ); } else @@ -229,11 +229,11 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) } $condition_data = array( - 'qid' => $qid, - 'scenario' => $p_scenario, - 'cqid' => $p_cqid, - 'cfieldname' => $conditionCfieldname, - 'method' => $p_method + 'qid' => $qid, + 'scenario' => $p_scenario, + 'cqid' => $p_cqid, + 'cfieldname' => $conditionCfieldname, + 'method' => $p_method ); if (isset($p_canswers)) @@ -286,7 +286,7 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) // UPDATE ENTRY IF THIS IS AN EDIT if (isset($p_subaction) && $p_subaction == "updatecondition") { - if (( !isset($p_canswers) && + if (( !isset($p_canswers) && !isset($_POST['ConditionConst']) && !isset($_POST['prevQuestionSGQA']) && !isset($_POST['tokenAttr']) && @@ -434,11 +434,11 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) foreach ($result->readAll() as $row) { $proformaconditions[] = array( - "scenario" => $row['scenario'], - "cqid" => $row['cqid'], - "cfieldname" => $row['cfieldname'], - "method" => $row['method'], - "value" => $row['value'] + "scenario" => $row['scenario'], + "cqid" => $row['cqid'], + "cfieldname" => $row['cfieldname'], + "method" => $row['method'], + "value" => $row['value'] ); } // while @@ -450,12 +450,12 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) //First lets make sure there isn't already an exact replica of this condition $conditions_data = array( - 'qid' => $newqid, - 'scenario' => $pfc['scenario'], - 'cqid' => $pfc['cqid'], - 'cfieldname' => $pfc['cfieldname'], - 'method' => $pfc['method'], - 'value' => $pfc['value'] + 'qid' => $newqid, + 'scenario' => $pfc['scenario'], + 'cqid' => $pfc['cqid'], + 'cfieldname' => $pfc['cfieldname'], + 'method' => $pfc['method'], + 'value' => $pfc['value'] ); $result = Condition::model()->findAllByAttributes($conditions_data); @@ -510,7 +510,7 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) //END PROCESS ACTIONS $cquestions = Array(); - $canswers = Array(); + $canswers = Array(); //BEGIN: GATHER INFORMATION // 1: Get information for this question @@ -595,14 +595,14 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) foreach ($result as $myrows) { //key => value $theserows[] = array( - "qid" => $myrows['qid'], - "sid" => $myrows['sid'], - "gid" => $myrows['gid'], - "question" => $myrows['question'], - "type" => $myrows['type'], - "mandatory" => $myrows['mandatory'], - "other" => $myrows['other'], - "title" => $myrows['title'] + "qid" => $myrows['qid'], + "sid" => $myrows['sid'], + "gid" => $myrows['gid'], + "question" => $myrows['question'], + "type" => $myrows['type'], + "mandatory" => $myrows['mandatory'], + "other" => $myrows['other'], + "title" => $myrows['title'] ); } } @@ -624,14 +624,14 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) foreach ($result as $myrows) { $postrows[]=array( - "qid" => $myrows['qid'], - "sid" => $myrows['sid'], - "gid" => $myrows['gid'], - "question" => $myrows['question'], - "type" => $myrows['type'], - "mandatory" => $myrows['mandatory'], - "other" => $myrows['other'], - "title" => $myrows['title'] + "qid" => $myrows['qid'], + "sid" => $myrows['sid'], + "gid" => $myrows['gid'], + "question" => $myrows['question'], + "type" => $myrows['type'], + "mandatory" => $myrows['mandatory'], + "other" => $myrows['other'], + "title" => $myrows['title'] ); } // while } @@ -1003,7 +1003,7 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) { // For dropdown questions // optinnaly add the 'Other' answer - if ( ( $rows['type'] == "L" || + if ( ( $rows['type'] == "L" || $rows['type'] == "!") && $rows['other'] == "Y" ) { @@ -1186,7 +1186,6 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) $aData['scenariocount'] = $scenariocount; $aViewUrls['conditionslist_view'][] = $aData; - if ($scenariocount > 0) { @@ -1213,7 +1212,7 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) $initialCheckbox = ""; } - if ( $scenariotext != "" && ($subaction == "editconditionsform" || $subaction == "insertcondition" || + if ( $scenariotext != "" && ($subaction == "editconditionsform" || $subaction == "insertcondition" || $subaction == "updatecondition" || $subaction == "editthiscondition" || $subaction == "renumberscenarios" || $subaction == "updatescenario" || $subaction == "deletescenario" || $subaction == "delete") @@ -1223,15 +1222,15 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) 'name'=>'DeleteWholeGroup' )); $additional_main_content = CHtml::link($img_tag, '#', array( - 'onclick' => "if ( confirm('".gT("Are you sure you want to delete all conditions set in this scenario?", "js")."')) { document.getElementById('deletescenario{$scenarionr['scenario']}').submit();}" + 'onclick' => "if ( confirm('".gT("Are you sure you want to delete all conditions set in this scenario?", "js")."')) { document.getElementById('deletescenario{$scenarionr['scenario']}').submit();}" )); $img_tag = CHtml::image($imageurl.'/scenario_edit.png', gT("Edit scenario"), array( 'name'=>'DeleteWholeGroup' )); $additional_main_content .= CHtml::link($img_tag, '#', array( - 'id' => 'editscenariobtn'.$scenarionr['scenario'], - 'onclick' => "$('#editscenario{$scenarionr['scenario']}').toggle('slow');" + 'id' => 'editscenariobtn'.$scenarionr['scenario'], + 'onclick' => "$('#editscenario{$scenarionr['scenario']}').toggle('slow');" )); $aData['additional_content'] = $additional_main_content; @@ -1264,6 +1263,7 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) ->bindValue(":lang2", $sLanguage, PDO::PARAM_STR) ->queryRow(); $conditionscount=(int)$result['recordcount']; + $query = "SELECT c.cid, c.scenario, c.cqid, c.cfieldname, c.method, c.value, q.type FROM {{conditions}} c, {{questions}} q, {{groups}} g WHERE c.cqid=q.qid " @@ -1276,13 +1276,13 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) ."AND c.cfieldname NOT LIKE '{%' " // avoid catching SRCtokenAttr conditions ."ORDER BY g.group_order, q.question_order, c.cfieldname"; $sLanguage=Survey::model()->findByPk($iSurveyID)->language; - $result=Yii::app()->db->createCommand($query) + $result2=Yii::app()->db->createCommand($query) ->bindValue(":scenario", $scenarionr['scenario']) ->bindValue(":qid", $qid, PDO::PARAM_INT) ->bindValue(":lang1", $sLanguage, PDO::PARAM_STR) ->bindValue(":lang2", $sLanguage, PDO::PARAM_STR) ->query() or safeDie ("Couldn't get other conditions for question $qid
          $query
          "); - + $result2=$result2->readAll(); $querytoken = "SELECT count(*) as recordcount " ."FROM {{conditions}} " ."WHERE " @@ -1322,11 +1322,10 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) { $aConditionsMerged[]=$arow; } - foreach ($result->readAll() as $arow) + foreach ($result2 as $arow) { $aConditionsMerged[]=$arow; } - foreach ($aConditionsMerged as $rows) { if($rows['method'] == "") {$rows['method'] = "==";} //Fill in the empty method from previous versions @@ -1568,9 +1567,9 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) } } - $aViewUrls['output'] .= CHtml::closeTag('td') . CHtml::closeTag('tr') . + $aViewUrls['output'] .= CHtml::closeTag('td') . CHtml::closeTag('tr') . CHtml::closeTag('table'). CHtml::closeTag('form') . - CHtml::closeTag('td') . CHtml::closeTag('tr'); + CHtml::closeTag('td') . CHtml::closeTag('tr'); $currentfield = $rows['cfieldname']; } @@ -1583,7 +1582,7 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null) } else { // no condition ==> disable delete all conditions button, and display a simple comment - $aViewUrls['output'] = CHtml::openTag('tr') . CHtml::tag('td', array(), + $aViewUrls['output'] = CHtml::openTag('tr') . CHtml::tag('td', array(), gT("This question is always shown.")).CHtml::tag('td', array(),' ').CHtml::closeTag('tr'); } From 45cc5434997ac97781a4a7a6a2df9d2b5b6115a5 Mon Sep 17 00:00:00 2001 From: Olle Harstedt Date: Tue, 14 Jun 2016 22:54:40 +0200 Subject: [PATCH 075/133] New feature #11378: afterSurveyMenuLoad event to add survey specific menu items --- application/core/Survey_Common_Action.php | 10 ++++++++++ application/views/admin/survey/surveybar_view.php | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/application/core/Survey_Common_Action.php b/application/core/Survey_Common_Action.php index b6030f556ab..666bb3eaf79 100644 --- a/application/core/Survey_Common_Action.php +++ b/application/core/Survey_Common_Action.php @@ -695,6 +695,16 @@ function _surveybar($iSurveyID, $gid=null) $aData['iIconSize'] = Yii::app()->getConfig('adminthemeiconsize'); $aData['sImageURL'] = Yii::app()->getConfig('adminimageurl'); + $event = new PluginEvent('afterSurveyMenuLoad', $this); + $event->set('menu', array()); + $event->set('surveyId', $iSurveyID); + $result = App()->getPluginManager()->dispatchEvent($event); + $aData['menu'] = $result->get('menu'); + if (empty($aData['menu'])) + { + $aData['menu'] = array(); + } + $this->getController()->renderPartial("/admin/survey/surveybar_view", $aData); } diff --git a/application/views/admin/survey/surveybar_view.php b/application/views/admin/survey/surveybar_view.php index 1dfd764a8a6..ae7781f45ff 100644 --- a/application/views/admin/survey/surveybar_view.php +++ b/application/views/admin/survey/surveybar_view.php @@ -263,6 +263,15 @@ <?php eT("Token management");?> + + +
        • + + <?php echo $menuItem['alt']; ?> + +
        • + +
        \n"; } - if (isset($conditionsList) && is_array($conditionsList)) + if (count($conditionsList)) { //TIBO App()->getClientScript()->registerScriptFile(Yii::app()->getConfig("generalscripts").'jquery/jquery.multiselect.min.js'); From a6ca80b7a9da6778804a71b52d7849516c77a626 Mon Sep 17 00:00:00 2001 From: Sam Mousa Date: Mon, 20 Jun 2016 11:38:43 +0200 Subject: [PATCH 078/133] Dev Fixed PHP7 issue: Uninitialized string offset. --- application/core/LSHttpRequest.php | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/application/core/LSHttpRequest.php b/application/core/LSHttpRequest.php index 4066f908c61..ee42b451b0b 100644 --- a/application/core/LSHttpRequest.php +++ b/application/core/LSHttpRequest.php @@ -52,4 +52,40 @@ protected function normalizeRequest(){ } } + + public function getPathInfo() + { + if($this->_pathInfo===null) + { + $pathInfo=$this->getRequestUri(); + + if(($pos=strpos($pathInfo,'?'))!==false) + $pathInfo=substr($pathInfo,0,$pos); + + $pathInfo=$this->decodePathInfo($pathInfo); + + $scriptUrl=$this->getScriptUrl(); + $baseUrl=$this->getBaseUrl(); + if(strpos($pathInfo,$scriptUrl)===0) + $pathInfo=substr($pathInfo,strlen($scriptUrl)); + elseif($baseUrl==='' || strpos($pathInfo,$baseUrl)===0) + $pathInfo=substr($pathInfo,strlen($baseUrl)); + elseif(strpos($_SERVER['PHP_SELF'],$scriptUrl)===0) + $pathInfo=substr($_SERVER['PHP_SELF'],strlen($scriptUrl)); + else + throw new CException(Yii::t('yii','CHttpRequest is unable to determine the path info of the request.')); + + if($pathInfo==='/') + $pathInfo=''; + elseif(!empty($pathInfo) && $pathInfo[0]==='/') + $pathInfo=substr($pathInfo,1); + + if(($posEnd=strlen($pathInfo)-1)>0 && $pathInfo[$posEnd]==='/') + $pathInfo=substr($pathInfo,0,$posEnd); + + $this->_pathInfo=$pathInfo; + } + return $this->_pathInfo; + } + } \ No newline at end of file From 4f923d353616c7e7d382066f1fec849421237729 Mon Sep 17 00:00:00 2001 From: Sam Mousa Date: Mon, 20 Jun 2016 11:40:08 +0200 Subject: [PATCH 079/133] Dev Added forgotten cache variable. --- application/core/LSHttpRequest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/core/LSHttpRequest.php b/application/core/LSHttpRequest.php index ee42b451b0b..cf2db4badd4 100644 --- a/application/core/LSHttpRequest.php +++ b/application/core/LSHttpRequest.php @@ -31,7 +31,11 @@ * Every route will be interpreted as a regex pattern. * */ -class LSHttpRequest extends CHttpRequest { +class LSHttpRequest extends CHttpRequest +{ + + private $_pathInfo; + public $noCsrfValidationRoutes = array(); protected function normalizeRequest(){ From b4a63209251066b3464a829c89a6fd9bc153e724 Mon Sep 17 00:00:00 2001 From: LouisGac Date: Wed, 29 Jun 2016 15:07:21 +0200 Subject: [PATCH 080/133] Fixed issue #10226: {ANSWERTABLE} includes