forked from backdrop/backdrop
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue backdrop#905: Put redirect module in core; basic functionality …
…here still needs tests, replace redirect specific helper functions with core apis wehre appropriate, code clean up doc blocks and documentation in general.
- Loading branch information
1 parent
b8cffe0
commit 5439cac
Showing
20 changed files
with
4,095 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"_config_name": "redirect.settings", | ||
"_config_static": true, | ||
"auto_redirect": true, | ||
"passthrough_querystring": true, | ||
"warning": false, | ||
"default_status_code": "301", | ||
"page_cache": false, | ||
"purge_inactive": false, | ||
"global_home": true, | ||
"global_clean": true, | ||
"global_canonical": true, | ||
"global_deslash": false, | ||
"global_admin_paths": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
(function ($) { | ||
|
||
Backdrop.behaviors.redirectAdmin = { | ||
attach: function (context) { | ||
$('table.redirect-list-tableselect tbody input:checkbox').bind('change', function(context) { | ||
var checked = $('table.redirect-list-tableselect input:checkbox:checked').length; | ||
if (checked) { | ||
$('fieldset.redirect-list-operations').slideDown(); | ||
} | ||
else { | ||
$('fieldset.redirect-list-operations').slideUp(); | ||
} | ||
}); | ||
$('table.redirect-list-tableselect th.select-all input:checkbox').bind('change', function(context) { | ||
var checked = $(this, context).attr('checked'); | ||
if (checked) { | ||
$('fieldset.redirect-list-operations').slideDown(); | ||
} | ||
else { | ||
$('fieldset.redirect-list-operations').slideUp(); | ||
} | ||
}); | ||
$('fieldset.redirect-list-operations').hide(); | ||
} | ||
}; | ||
|
||
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
(function ($) { | ||
|
||
Backdrop.behaviors.redirectFieldsetSummaries = { | ||
attach: function (context) { | ||
$('fieldset.redirect-list', context).backdropSetSummary(function (context) { | ||
if ($('table.redirect-list tbody td.empty', context).length) { | ||
return Backdrop.t('No redirects'); | ||
} | ||
else { | ||
var redirects = $('table.redirect-list tbody tr', context).length; | ||
return Backdrop.formatPlural(redirects, '1 redirect', '@count redirects'); | ||
} | ||
}); | ||
} | ||
}; | ||
|
||
})(jQuery); |
Oops, something went wrong.