From ad411f04a181995948c440412673840c6e21a0fb Mon Sep 17 00:00:00 2001 From: "Aaron T. Maturen" Date: Fri, 20 Jul 2012 10:56:50 -0400 Subject: [PATCH] added archive button --- build.sh | 5 ++++- hooks/search.php | 15 +++++++++++++++ inline_keywords.yaml | 2 +- languages/en.php | 2 ++ pages/archive_resources.php | 14 ++++++++++++++ 5 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 pages/archive_resources.php diff --git a/build.sh b/build.sh index fa1568f..ffd81c1 100755 --- a/build.sh +++ b/build.sh @@ -3,10 +3,13 @@ git log | grep -m 1 commit commit=`git log | grep -m 1 commit ` commitnick=${commit:7:10} -commitnick='0.6' +commitnick='0.7' echo "updating version information in inline_keywords.yaml with latest git commit $commitnick" sed -ibk "s/version: .*/version: $commitnick/" inline_keywords.yaml rm inline_keywords.yamlbk cd .. rm inline_keywords*.rsp +cp -r rs_inline_keywords inline_keywords tar -cz -f inline_keywords-$commitnick.rsp -X inline_keywords/exclude.txt inline_keywords +rm -rf inline_keywords + diff --git a/hooks/search.php b/hooks/search.php index 0723b0a..b96241a 100644 --- a/hooks/search.php +++ b/hooks/search.php @@ -27,6 +27,7 @@ function HookInline_keywordsSearchSearchbarbottomtoolbar() "> "> "> + "> @@ -91,6 +92,20 @@ function HookInline_keywordsSearchAdditionalheaderjs() jQuery('.chosen .ResourcePanel, .chosen .ResourcePanelSmall').css('border-color',''); }); + jQuery('#archiveResourcesButton').on('click', function(){ + resourceIds = jQuery.map(jQuery('.chosen'), function(a, b){ + return jQuery(a).attr('id').replace('ResourceShell',''); + }).join('+'); + jQuery.ajax({ + type: "POST", + url: "/plugins/inline_keywords/pages/archive_resources.php", + data: { refs: resourceIds } + }).done(function( msg ) { + location.reload(true); + }); + + }); + jQuery('#submitSelectedResourceButton').on('click', function() { var form_values = jQuery('form#manipulateKeywords').serialize(); resourceIds = jQuery.map(jQuery('.chosen'), function(a, b){ diff --git a/inline_keywords.yaml b/inline_keywords.yaml index 3f5579e..71d145f 100644 --- a/inline_keywords.yaml +++ b/inline_keywords.yaml @@ -1,6 +1,6 @@ name: inline_keywords author: Aaron T. Maturen -version: 0.6 +version: 0.7 desc: Enable Editing Fields on Search Result Page info_url: https://github.com/aaronmaturen/rs_inline_keywords config_url: /plugins/inline_keywords/pages/setup.php diff --git a/languages/en.php b/languages/en.php index ec18e59..7a544dd 100644 --- a/languages/en.php +++ b/languages/en.php @@ -25,4 +25,6 @@ $lang['no-yes'] = array('No', 'Yes'); +$lang["archiveresources"] = 'Archive'; + ?> \ No newline at end of file diff --git a/pages/archive_resources.php b/pages/archive_resources.php new file mode 100644 index 0000000..9710bf6 --- /dev/null +++ b/pages/archive_resources.php @@ -0,0 +1,14 @@ + \ No newline at end of file