mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 00:06:55 +02:00
Various minor unrelated updates
This commit is contained in:
@@ -448,7 +448,7 @@ DirectoryIndex index.php index.html index.htm
|
|||||||
RewriteCond %{REQUEST_FILENAME} !(favicon\.ico|robots\.txt)
|
RewriteCond %{REQUEST_FILENAME} !(favicon\.ico|robots\.txt)
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------
|
||||||
# 18. Optionally (O) prevent PW from attempting to serve images or anything in /site/assets/.
|
# 18. Optionally (O) prevent PW from serving some file types, or anything in /site/assets/.
|
||||||
# Both of these lines are optional, but can help to reduce server load. However, they
|
# Both of these lines are optional, but can help to reduce server load. However, they
|
||||||
# are not compatible with the $config->pagefileSecure option (if enabled) and they
|
# are not compatible with the $config->pagefileSecure option (if enabled) and they
|
||||||
# may produce an Apache 404 rather than your regular 404. You may uncomment the two lines
|
# may produce an Apache 404 rather than your regular 404. You may uncomment the two lines
|
||||||
@@ -458,7 +458,7 @@ DirectoryIndex index.php index.html index.htm
|
|||||||
# section #2 above that makes ProcessWire the 404 handler.
|
# section #2 above that makes ProcessWire the 404 handler.
|
||||||
# -----------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# RewriteCond %{REQUEST_URI} !\.(jpg|jpeg|gif|png|ico|webp|svg)$ [NC]
|
# RewriteCond %{REQUEST_URI} !\.(jpg|jpeg|gif|png|ico|webp|svg|js|css)$ [NC]
|
||||||
# RewriteCond %{REQUEST_FILENAME} !(^|/)site/assets/
|
# RewriteCond %{REQUEST_FILENAME} !(^|/)site/assets/
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------
|
||||||
@@ -479,4 +479,3 @@ DirectoryIndex index.php index.html index.htm
|
|||||||
#################################################################################################
|
#################################################################################################
|
||||||
# END PROCESSWIRE HTACCESS DIRECTIVES
|
# END PROCESSWIRE HTACCESS DIRECTIVES
|
||||||
#################################################################################################
|
#################################################################################################
|
||||||
|
|
||||||
|
@@ -970,7 +970,12 @@ class PagesExportImport extends Wire {
|
|||||||
}
|
}
|
||||||
if(!$commitException) {
|
if(!$commitException) {
|
||||||
if($pageValue !== null && $fieldtypeImportOptions['returnsPageValue']) {
|
if($pageValue !== null && $fieldtypeImportOptions['returnsPageValue']) {
|
||||||
|
// @todo debug why FieldtypeTextLanguage requires a setAndSave() at this point.
|
||||||
|
//if($field->type == 'FieldtypePageTitleLanguage' || $field->type == 'FieldtypeTextLanguage') {
|
||||||
|
// $page->setAndSave($field->name, $pageValue);
|
||||||
|
// } else {
|
||||||
$page->set($field->name, $pageValue);
|
$page->set($field->name, $pageValue);
|
||||||
|
// }
|
||||||
} else if(!$fieldtypeImportOptions['returnsPageValue']) {
|
} else if(!$fieldtypeImportOptions['returnsPageValue']) {
|
||||||
$page->trackChange("{$field->name}__");
|
$page->trackChange("{$field->name}__");
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/**
|
/**
|
||||||
* ProcessWire shutdown handler
|
* ProcessWire shutdown handler
|
||||||
*
|
*
|
||||||
* ProcessWire 3.x, Copyright 2021 by Ryan Cramer
|
* ProcessWire 3.x, Copyright 2023 by Ryan Cramer
|
||||||
*
|
*
|
||||||
* Look for errors at shutdown and log them, plus echo the error if the page is editable
|
* Look for errors at shutdown and log them, plus echo the error if the page is editable
|
||||||
*
|
*
|
||||||
@@ -115,6 +115,7 @@ class WireShutdown extends Wire {
|
|||||||
register_shutdown_function(array($this, 'shutdown'));
|
register_shutdown_function(array($this, 'shutdown'));
|
||||||
// If script is being called externally, add an extra shutdown function
|
// If script is being called externally, add an extra shutdown function
|
||||||
if(!$config->internal) register_shutdown_function(array($this, 'shutdownExternal'));
|
if(!$config->internal) register_shutdown_function(array($this, 'shutdownExternal'));
|
||||||
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -396,7 +397,7 @@ class WireShutdown extends Wire {
|
|||||||
$http = new WireHttp();
|
$http = new WireHttp();
|
||||||
$codes = $http->getHttpCodes();
|
$codes = $http->getHttpCodes();
|
||||||
$code = 500;
|
$code = 500;
|
||||||
if($this->fatalErrorResponse['code']) {;
|
if($this->fatalErrorResponse['code']) {
|
||||||
$code = (int) $this->fatalErrorResponse['code'];
|
$code = (int) $this->fatalErrorResponse['code'];
|
||||||
} else if($this->config) {
|
} else if($this->config) {
|
||||||
$code = (int) $this->config->fatalErrorCode;
|
$code = (int) $this->config->fatalErrorCode;
|
||||||
@@ -458,7 +459,7 @@ class WireShutdown extends Wire {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$out = ob_get_level() ? ob_get_clean() : '';
|
$out = ob_get_level() ? (string) ob_get_clean() : '';
|
||||||
if(!strlen(trim($out))) return false;
|
if(!strlen(trim($out))) return false;
|
||||||
|
|
||||||
// if error message isn't in existing output, then return as-is
|
// if error message isn't in existing output, then return as-is
|
||||||
@@ -491,7 +492,7 @@ class WireShutdown extends Wire {
|
|||||||
$out = str_replace($message, $token, $out);
|
$out = str_replace($message, $token, $out);
|
||||||
|
|
||||||
// replace anything else on the same line as the PHP error (error type, file, line-number)
|
// replace anything else on the same line as the PHP error (error type, file, line-number)
|
||||||
$out = preg_replace('/([\r\n]|^)[^\r\n]+' . $token . '[^\r\n]*/', '', $out);
|
$out = (string) preg_replace('/([\r\n]|^)[^\r\n]+' . $token . '[^\r\n]*/', '', $out);
|
||||||
|
|
||||||
// ensure certain tags that could interfere with error message output are closed
|
// ensure certain tags that could interfere with error message output are closed
|
||||||
$tags = array(
|
$tags = array(
|
||||||
@@ -650,6 +651,7 @@ class WireShutdown extends Wire {
|
|||||||
if(!$config->paths->logs) return false;
|
if(!$config->paths->logs) return false;
|
||||||
$message = str_replace(array("\n", "\t"), " ", $message);
|
$message = str_replace(array("\n", "\t"), " ", $message);
|
||||||
try {
|
try {
|
||||||
|
/** @var FileLog $log */
|
||||||
$log = $this->wire(new FileLog($config->paths->logs . 'errors.txt'));
|
$log = $this->wire(new FileLog($config->paths->logs . 'errors.txt'));
|
||||||
$log->setDelimeter("\t");
|
$log->setDelimeter("\t");
|
||||||
$saved = $log->save("$userName\t$url\t$message");
|
$saved = $log->save("$userName\t$url\t$message");
|
||||||
@@ -783,4 +785,3 @@ class WireShutdown extends Wire {
|
|||||||
if($process == 'ProcessPageView') $process->finished();
|
if($process == 'ProcessPageView') $process->finished();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
*
|
*
|
||||||
* #pw-body
|
* #pw-body
|
||||||
*
|
*
|
||||||
* ProcessWire 3.x, Copyright 2022 by Ryan Cramer
|
* ProcessWire 3.x, Copyright 2023 by Ryan Cramer
|
||||||
* https://processwire.com
|
* https://processwire.com
|
||||||
*
|
*
|
||||||
* @property LanguageTabs|null $tabs Current LanguageTabs module instance, if installed #pw-internal
|
* @property LanguageTabs|null $tabs Current LanguageTabs module instance, if installed #pw-internal
|
||||||
@@ -196,7 +196,7 @@ class Languages extends PagesType {
|
|||||||
$template = $this->getTemplate();
|
$template = $this->getTemplate();
|
||||||
$parent_id = $this->getParentID();
|
$parent_id = $this->getParentID();
|
||||||
$selector = "parent_id=$parent_id, template=$template, include=all, sort=sort";
|
$selector = "parent_id=$parent_id, template=$template, include=all, sort=sort";
|
||||||
$languagesAll = $this->wire('pages')->find($selector, array(
|
$languagesAll = $this->wire()->pages->find($selector, array(
|
||||||
'loadOptions' => $this->getLoadOptions(),
|
'loadOptions' => $this->getLoadOptions(),
|
||||||
'caller' => $this->className() . '.getAll()'
|
'caller' => $this->className() . '.getAll()'
|
||||||
)
|
)
|
||||||
@@ -219,10 +219,10 @@ class Languages extends PagesType {
|
|||||||
$excludeLanguage = $selector;
|
$excludeLanguage = $selector;
|
||||||
$selector = '';
|
$selector = '';
|
||||||
} else {
|
} else {
|
||||||
$excludeLanguage = $this->wire('user')->language;
|
$excludeLanguage = $this->wire()->user->language;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$languages = $this->wire('pages')->newPageArray();
|
$languages = $this->wire()->pages->newPageArray();
|
||||||
foreach($this as $language) {
|
foreach($this as $language) {
|
||||||
if($language->id == $excludeLanguage->id) continue;
|
if($language->id == $excludeLanguage->id) continue;
|
||||||
if($selector && !$language->matches($selector)) continue;
|
if($selector && !$language->matches($selector)) continue;
|
||||||
@@ -254,7 +254,7 @@ class Languages extends PagesType {
|
|||||||
#[\ReturnTypeWillChange]
|
#[\ReturnTypeWillChange]
|
||||||
public function getIterator() {
|
public function getIterator() {
|
||||||
if($this->languages && count($this->languages)) return $this->languages;
|
if($this->languages && count($this->languages)) return $this->languages;
|
||||||
$languages = $this->wire('pages')->newPageArray();
|
$languages = $this->wire()->pages->newPageArray();
|
||||||
foreach($this->getAll() as $language) {
|
foreach($this->getAll() as $language) {
|
||||||
if($language->hasStatus(Page::statusUnpublished) || $language->hasStatus(Page::statusHidden)) continue;
|
if($language->hasStatus(Page::statusUnpublished) || $language->hasStatus(Page::statusHidden)) continue;
|
||||||
$languages->add($language);
|
$languages->add($language);
|
||||||
@@ -310,8 +310,7 @@ class Languages extends PagesType {
|
|||||||
if(is_null($language)) {
|
if(is_null($language)) {
|
||||||
// save current user language setting and make current language default
|
// save current user language setting and make current language default
|
||||||
if(!$this->defaultLanguage) return;
|
if(!$this->defaultLanguage) return;
|
||||||
/** @var User $user */
|
$user = $this->wire()->user;
|
||||||
$user = $this->wire('user');
|
|
||||||
if($user->language->id == $this->defaultLanguage->id) return; // already default
|
if($user->language->id == $this->defaultLanguage->id) return; // already default
|
||||||
$this->savedLanguage = $user->language;
|
$this->savedLanguage = $user->language;
|
||||||
$previouslyChanged = $user->isChanged('language');
|
$previouslyChanged = $user->isChanged('language');
|
||||||
@@ -332,8 +331,7 @@ class Languages extends PagesType {
|
|||||||
*/
|
*/
|
||||||
public function unsetDefault() {
|
public function unsetDefault() {
|
||||||
if(!$this->savedLanguage || !$this->defaultLanguage) return;
|
if(!$this->savedLanguage || !$this->defaultLanguage) return;
|
||||||
/** @var User $user */
|
$user = $this->wire()->user;
|
||||||
$user = $this->wire('user');
|
|
||||||
$previouslyChanged = $user->isChanged('language');
|
$previouslyChanged = $user->isChanged('language');
|
||||||
$user->language = $this->savedLanguage;
|
$user->language = $this->savedLanguage;
|
||||||
if(!$previouslyChanged) $user->untrackChange('language');
|
if(!$previouslyChanged) $user->untrackChange('language');
|
||||||
@@ -597,7 +595,7 @@ class Languages extends PagesType {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function getParent() {
|
public function getParent() {
|
||||||
return $this->wire('pages')->get($this->parent_id, array('loadOptions' => array('autojoin' => false)));
|
return $this->wire()->pages->get($this->parent_id, array('loadOptions' => array('autojoin' => false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -610,7 +608,7 @@ class Languages extends PagesType {
|
|||||||
*/
|
*/
|
||||||
public function getParents() {
|
public function getParents() {
|
||||||
if(count($this->parents)) {
|
if(count($this->parents)) {
|
||||||
return $this->wire('pages')->getById($this->parents, array('autojoin' => false));
|
return $this->wire()->pages->getById($this->parents, array('autojoin' => false));
|
||||||
} else {
|
} else {
|
||||||
return parent::getParents();
|
return parent::getParents();
|
||||||
}
|
}
|
||||||
@@ -674,10 +672,10 @@ class Languages extends PagesType {
|
|||||||
if(!is_array($this->pageEditPermissions)) {
|
if(!is_array($this->pageEditPermissions)) {
|
||||||
$this->pageEditPermissions = array();
|
$this->pageEditPermissions = array();
|
||||||
$langNames = array();
|
$langNames = array();
|
||||||
foreach($this->wire('languages') as $language) {
|
foreach($this as $language) {
|
||||||
$langNames[$language->name] = $language->name;
|
$langNames[$language->name] = $language->name;
|
||||||
}
|
}
|
||||||
foreach($this->wire('permissions') as $permission) {
|
foreach($this->wire()->permissions as $permission) {
|
||||||
if(strpos($permission->name, $prefix) !== 0) continue;
|
if(strpos($permission->name, $prefix) !== 0) continue;
|
||||||
if($permission->name === $prefix . 'none') {
|
if($permission->name === $prefix . 'none') {
|
||||||
$this->pageEditPermissions['none'] = $permission->name;
|
$this->pageEditPermissions['none'] = $permission->name;
|
||||||
@@ -722,7 +720,7 @@ class Languages extends PagesType {
|
|||||||
$permissions = $this->getPageEditPermissions();
|
$permissions = $this->getPageEditPermissions();
|
||||||
if($language === 'none' && isset($permissions['none'])) return $permissions['none'];
|
if($language === 'none' && isset($permissions['none'])) return $permissions['none'];
|
||||||
if(!$language instanceof Language) {
|
if(!$language instanceof Language) {
|
||||||
$language = $this->get($this->wire('sanitizer')->pageNameUTF8($language));
|
$language = $this->get($this->wire()->sanitizer->pageNameUTF8($language));
|
||||||
}
|
}
|
||||||
if(!$language || !$language->id) return '';
|
if(!$language || !$language->id) return '';
|
||||||
return isset($permissions[$language->name]) ? $permissions[$language->name] : '';
|
return isset($permissions[$language->name]) ? $permissions[$language->name] : '';
|
||||||
@@ -737,7 +735,7 @@ class Languages extends PagesType {
|
|||||||
*/
|
*/
|
||||||
public function editable($language) {
|
public function editable($language) {
|
||||||
|
|
||||||
$user = $this->wire('user');
|
$user = $this->wire()->user;
|
||||||
if($user->isSuperuser()) return true;
|
if($user->isSuperuser()) return true;
|
||||||
if(empty($language)) return false;
|
if(empty($language)) return false;
|
||||||
$cacheKey = "$user->id.$language";
|
$cacheKey = "$user->id.$language";
|
||||||
@@ -757,11 +755,10 @@ class Languages extends PagesType {
|
|||||||
// if the page-edit-lang-none permission doesn't exist, then it's not applicable
|
// if the page-edit-lang-none permission doesn't exist, then it's not applicable
|
||||||
$has = $user->hasPermission('page-edit');
|
$has = $user->hasPermission('page-edit');
|
||||||
}
|
}
|
||||||
$this->editableCache[$cacheKey] = $has;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if(!$language instanceof Language) $language = $this->get($this->wire('sanitizer')->pageNameUTF8($language));
|
if(!$language instanceof Language) $language = $this->get($this->wire()->sanitizer->pageNameUTF8($language));
|
||||||
if(!$language || !$language->id) return false;
|
if(!$language || !$language->id) return false;
|
||||||
|
|
||||||
$cacheKey = "$user->id.$language->id";
|
$cacheKey = "$user->id.$language->id";
|
||||||
@@ -782,9 +779,9 @@ class Languages extends PagesType {
|
|||||||
$has = $user->hasPermission($permissionName);
|
$has = $user->hasPermission($permissionName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->editableCache[$cacheKey] = $has;
|
$this->editableCache[$cacheKey] = $has;
|
||||||
}
|
|
||||||
|
|
||||||
return $has;
|
return $has;
|
||||||
}
|
}
|
||||||
@@ -895,8 +892,4 @@ class Languages extends PagesType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1 +1 @@
|
|||||||
$(document).ready(function(){var fieldFilterFormChange=function(){$("#field_filter_form").trigger("submit")};$("#templates_id").on("change",fieldFilterFormChange);$("#fieldtype").on("change",fieldFilterFormChange);$("#wrap_show_system input").on("click",fieldFilterFormChange);var $asmListItemStatus=$("#asmListItemStatus");var $columnWidth=$("#columnWidth");function setAsmListItemStatus(){var tpl=$asmListItemStatus.attr("data-tpl");if(!tpl)return;var showIf=$("#Inputfield_showIf").val();var required=$("#Inputfield_required").is(":checked")?true:false;if(showIf&&showIf.length>0)tpl="<i class='fa fa-question-circle'></i>"+tpl;if(required)tpl="<i class='fa fa-asterisk'></i>"+tpl;var w=parseInt($columnWidth.val());if(w==100)w=0;if(w>0)w=w+"%";else w="";tpl=tpl.replace("%",w);$asmListItemStatus.val(tpl)}$("#Inputfield_showIf").on("change",setAsmListItemStatus);$("#Inputfield_required").on("change",setAsmListItemStatus);setAsmListItemStatus();$(".columnWidthInput").each(function(){var $columnWidth=$(this);var $slider=$("<div class='InputfieldColumnWidthSlider'></div>");var columnWidthVal=parseInt($columnWidth.val());$columnWidth.val(columnWidthVal+"%");$columnWidth.after($slider);$slider.slider({range:"min",min:10,max:100,value:parseInt($columnWidth.val()),slide:function(e,ui){var val=ui.value+"%";$columnWidth.val(val).trigger("change");if($columnWidth.prop("id")==="columnWidth")setAsmListItemStatus()}});$columnWidth.on("change",function(){var val=parseInt($(this).val());if(val>100)val=100;if(val<10)val=10;$(this).val(val+"%");$slider.slider("option","value",val)})});var $fieldEdit=$("#ProcessFieldEdit");if($fieldEdit.length>0&&$("li.WireTab").length>1){$fieldEdit.find("script").remove();$fieldEdit.WireTabs({items:$(".Inputfields li.WireTab"),id:"FieldEditTabs",skipRememberTabIDs:["delete"]})}$("#fieldgroupContextSelect").on("change",function(){var field_id=$("#Inputfield_id").val();var fieldgroup_id=$(this).val();var href="./edit?id="+field_id;if(fieldgroup_id>0)href+="&fieldgroup_id="+fieldgroup_id;window.location=href});$("a.fieldFlag").on("click",function(){if($(this).attr("href")==="#")return false});$("#export_data").on("click",function(){$(this).select()});$(".import_toggle input[type=radio]").on("change",function(){var $table=$(this).parents("p.import_toggle").next("table");var $fieldset=$(this).closest(".InputfieldFieldset");if($(this).is(":checked")&&$(this).val()==0){$table.hide();$fieldset.addClass("ui-priority-secondary")}else{$table.show();$fieldset.removeClass("ui-priority-secondary")}}).trigger("change");$("#wrap_Inputfield_send_templates").find(":input").on("change",function(){$("#_send_templates_changed").val("changed")});$("#viewRoles_37").on("click",function(){if($(this).is(":checked"))$("input.viewRoles").prop("checked",true)});$("input.viewRoles:not(#viewRoles_37)").on("click",function(){if($("#viewRoles_37").is(":checked"))return false;return true});$("input.editRoles:not(:disabled)").on("click",function(){if($(this).is(":checked")){$(this).closest("tr").find("input.viewRoles").prop("checked",true)}});$(".override-select-all").on("click",function(){var $checkboxes=$(this).closest("table").find("input[type=checkbox]");if($(this).hasClass("override-checked")){$checkboxes.prop("checked",false);$(this).removeClass("override-checked")}else{$checkboxes.prop("checked",true);$(this).addClass("override-checked")}return false});$(document).on("pw-modal-closed","a",function(e,ui){if(!$("#tab-overrides").is(":visible"))return;Inputfields.reload("#Inputfield_overrides_table")})});
|
$(document).ready(function(){var fieldFilterFormChange=function(){$("#field_filter_form").trigger("submit")};$("#templates_id").on("change",fieldFilterFormChange);$("#fieldtype").on("change",fieldFilterFormChange);$("#wrap_show_system input").on("click",fieldFilterFormChange);var $asmListItemStatus=$("#asmListItemStatus");var $columnWidth=$("#columnWidth");function setAsmListItemStatus(){var tpl=$asmListItemStatus.attr("data-tpl");if(!tpl)return;var showIf=$("#Inputfield_showIf").val();var required=$("#Inputfield_required").is(":checked")?true:false;if(showIf&&showIf.length>0)tpl="<i class='fa fa-question-circle'></i>"+tpl;if(required)tpl="<i class='fa fa-asterisk'></i>"+tpl;var w=parseInt($columnWidth.val());if(w==100)w=0;if(w>0)w=w+"%";else w="";tpl=tpl.replace("%",w);$asmListItemStatus.val(tpl)}$("#Inputfield_showIf").on("change",setAsmListItemStatus);$("#Inputfield_required").on("change",setAsmListItemStatus);setAsmListItemStatus();$(".columnWidthInput").each(function(){var $columnWidth=$(this);var $slider=$("<div class='InputfieldColumnWidthSlider'></div>");var columnWidthVal=parseInt($columnWidth.val());$columnWidth.val(columnWidthVal+"%");$columnWidth.after($slider);$slider.slider({range:"min",min:10,max:100,value:parseInt($columnWidth.val()),slide:function(e,ui){var val=ui.value+"%";$columnWidth.val(val).trigger("change");if($columnWidth.prop("id")==="columnWidth")setAsmListItemStatus()}});$columnWidth.on("change",function(){var val=parseInt($(this).val());if(val>100)val=100;if(val<10)val=10;$(this).val(val+"%");$slider.slider("option","value",val)})});var $fieldEdit=$("#ProcessFieldEdit");if($fieldEdit.length>0&&$("li.WireTab").length>1){$fieldEdit.find("script").remove();$fieldEdit.WireTabs({items:$(".Inputfields li.WireTab"),id:"FieldEditTabs",skipRememberTabIDs:["delete"]})}$("#fieldgroupContextSelect").on("change",function(){var field_id=$("#Inputfield_id").val();var fieldgroup_id=$(this).val();var href="./edit?id="+field_id;if(fieldgroup_id>0)href+="&fieldgroup_id="+fieldgroup_id;window.location=href});$("a.fieldFlag").on("click",function(){if($(this).attr("href")==="#")return false});$("#export_data").on("click",function(){$(this).trigger("select")});$(".import_toggle input[type=radio]").on("change",function(){var $table=$(this).parents("p.import_toggle").next("table");var $fieldset=$(this).closest(".InputfieldFieldset");if($(this).is(":checked")&&$(this).val()==0){$table.hide();$fieldset.addClass("ui-priority-secondary")}else{$table.show();$fieldset.removeClass("ui-priority-secondary")}}).trigger("change");$("#wrap_Inputfield_send_templates").find(":input").on("change",function(){$("#_send_templates_changed").val("changed")});$("#viewRoles_37").on("click",function(){if($(this).is(":checked"))$("input.viewRoles").prop("checked",true)});$("input.viewRoles:not(#viewRoles_37)").on("click",function(){if($("#viewRoles_37").is(":checked"))return false;return true});$("input.editRoles:not(:disabled)").on("click",function(){if($(this).is(":checked")){$(this).closest("tr").find("input.viewRoles").prop("checked",true)}});$(".override-select-all").on("click",function(){var $checkboxes=$(this).closest("table").find("input[type=checkbox]");if($(this).hasClass("override-checked")){$checkboxes.prop("checked",false);$(this).removeClass("override-checked")}else{$checkboxes.prop("checked",true);$(this).addClass("override-checked")}return false});$(document).on("pw-modal-closed","a",function(e,ui){if(!$("#tab-overrides").is(":visible"))return;Inputfields.reload("#Inputfield_overrides_table")})});
|
Reference in New Issue
Block a user