Skip to content

Commit

Permalink
Item13270: add link to configured site. Sort AccessibleCFG to make co…
Browse files Browse the repository at this point in the history
…mparison easier, and add a couple of missing items
  • Loading branch information
Comment committed Feb 25, 2015
1 parent 13de588 commit 4158b93
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 50 deletions.
Expand Up @@ -493,3 +493,7 @@ table.tml {
.searchResults {
margin-bottom:2em;
}

#visitSite {
margin-left: 3em;
}
Expand Up @@ -660,6 +660,9 @@ function _id_ify(id) {
});
}

// Attach handler to copy with the "visit site" button
$('body').trigger("configurecreate", _id_ify(spec.keys));

update_modified_default($node);
}

Expand Down Expand Up @@ -939,7 +942,7 @@ if (0) {
load_ui($(this).removeClass('load_ui'));
});

// Invoke any dependency handlers
// Invoke any dependency handlers
$.each(on_ready, function(index, handler) {
handler.call();
});
Expand Down Expand Up @@ -1060,6 +1063,25 @@ if (0) {

$('#showExpert').button({disabled: true});

$('#visitSite').button();

$('body').on("configurecreate", function(event, id) {
if (id === 'i-DefaultUrlHost-'
|| id === 'i-ScriptUrlPath-'
|| id === 'i-ScriptSuffix-') {
$('#' + id).change(function() {
var $vs = $('#visitSite');
var url = $('#i-DefaultUrlHost-').val()
+ $('#i-ScriptUrlPath-').val()
+ '/view'
+ $('#i-ScriptSuffix-').val();
$('#visitSite')
.attr("href", url)
.text(url);
});
}
});

$('#saveButton').button({disabled: !bs}).click(function() {
confirm_action = function() {
var params = {
Expand Down
Expand Up @@ -100,6 +100,14 @@ var Types = {};
else
val = val.replace(/^\s*(["'])(.*?)\1\s*/, "$2");
this.useVal(val);
},
isDefault: function() {
// trim ' from the default
var val = this.spec['default'];
if (typeof(val) === 'string') {
val = val.replace(/^\s*(["'])(.*?)\1\s*/, "$2");
}
return this.currentValue() === val;
}
});

Expand Down
1 change: 1 addition & 0 deletions ConfigurePlugin/templates/configure.tmpl
Expand Up @@ -31,6 +31,7 @@ configure.js script.
<body>
<div class="header clearfix">
<img class="logo" src="%PUBURLPATH%/%SYSTEMWEB%/ConfigurePlugin/foswiki-logo.png" alt="Foswiki configure" height="60" />
<a id="visitSite" href="%SCRIPTURL{view}%" title="Open configured site in a new window" target="_blank">%SCRIPTURL{view}%</a>
<div class="top_level_buttons">
<input type="text" style="width:30em" id="searchInput" placeholder="search"/>
<button id="searchButton" title="Search in titles and keys">Search</button>
Expand Down
99 changes: 50 additions & 49 deletions core/lib/Foswiki.spec
Expand Up @@ -864,69 +864,70 @@ $Foswiki::cfg{Register}{EmailFilter} = '';
# the set. This is done as a filter in because while the bulk of configuration
# items are quite innocent, it's better to be a bit paranoid.
$Foswiki::cfg{AccessibleCFG} = [
'{ScriptSuffix}',
'{LoginManager}',
'{AuthScripts}',
'{LoginNameFilterIn}',
'{AccessControlACL}{EnableDeprecatedEmptyDeny}',
'{AccessibleCFG}',
'{AdminUserLogin}',
'{AdminUserWikiName}',
'{SuperAdminGroup}',
'{UsersTopicName}',
'{AuthRealm}',
'{MinPasswordLength}',
'{Register}{AllowLoginName}',
'{Register}{EnableNewUserRegistration}',
'{Register}{NeedVerification}',
'{Register}{NeedApproval}',
'{Register}{Approvers}',
'{Register}{RegistrationAgentWikiName}',
'{DenyDotDotInclude}',
'{UploadFilter}',
'{NameFilter}',
'{AccessibleCFG}',
'{AntiSpam}{EmailPadding}',
'{AntiSpam}{EntityEncode}',
'{AntiSpam}{HideUserDetails}',
'{AntiSpam}{RobotsAreWelcome}',
'{Stats}{TopViews}',
'{Stats}{TopContrib}',
'{Stats}{TopicName}',
'{UserInterfaceInternationalisation}',
'{UseLocale}',
'{Site}{Locale}',
'{Site}{CharSet}',
'{DisplayTimeValues}',
'{AuthRealm}',
'{AuthScripts}',
'{Cache}{Enabled}',
'{DefaultDateFormat}',
'{Site}{LocaleRegexes}',
'{UpperNational}',
'{LowerNational}',
'{PluralToSingular}',
'{DefaultUrlHost}',
'{DenyDotDotInclude}',
'{DisplayTimeValues}',
'{EnableHierarchicalWebs}',
'{WebMasterEmail}',
'{WebMasterName}',
'{NotifyTopicName}',
'{SystemWebName}',
'{TrashWebName}',
'{SitePrefsTopicName}',
'{LocalSitePreferences}',
'{FormTypes}',
'{HomeTopicName}',
'{WebPrefsTopicName}',
'{UsersWebName}',
'{TemplatePath}',
'{LinkProtocolPattern}',
'{NumberOfRevisions}',
'{MaxRevisionsInADiff}',
'{ReplaceIfEditedAgainWithin}',
'{LeaseLength}',
'{LeaseLengthLessForceful}',
'{Plugins}{WebSearchPath}',
'{LinkProtocolPattern}',
'{LocalSitePreferences}',
'{LoginNameFilterIn}',
'{LowerNational}',
'{MaxRevisionsInADiff}',
'{MinPasswordLength}',
'{NameFilter}',
'{NotifyTopicName}',
'{NumberOfRevisions}',
'{PluginsOrder}',
'{Cache}{Enabled}',
'{Validation}{Method}',
'{Plugins}{WebSearchPath}',
'{PluralToSingular}',
'{Register}{AllowLoginName}',
'{Register}{Approvers}',
'{Register}{DisablePasswordConfirmation}',
'{Register}{EnableNewUserRegistration}',
'{Register}{NeedApproval}',
'{Register}{NeedVerification}',
'{Register}{RegistrationAgentWikiName}',
'{ReplaceIfEditedAgainWithin}',
'{ScriptSuffix}',
'{ScriptUrlPath}',
'{Site}{CharSet}',
'{Site}{Locale}',
'{Site}{LocaleRegexes}',
'{SitePrefsTopicName}',
'{Stats}{TopContrib}',
'{Stats}{TopicName}',
'{Stats}{TopViews}',
'{SuperAdminGroup}',
'{SystemWebName}',
'{TemplateLogin}{AllowLoginUsingEmailAddress}',
'{FormTypes}',
'{AccessControlACL}{EnableDeprecatedEmptyDeny}'
'{TemplatePath}',
'{TrashWebName}',
'{UploadFilter}',
'{UpperNational}',
'{UseLocale}',
'{UserInterfaceInternationalisation}',
'{UsersTopicName}',
'{UsersWebName}',
'{Validation}{Method}',
'{WebMasterEmail}',
'{WebMasterName}',
'{WebPrefsTopicName}',
];
# **BOOLEAN LABEL="Allow URLs in INCLUDE"**
Expand Down

0 comments on commit 4158b93

Please sign in to comment.