summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLibertySystem.php3
-rw-r--r--content_permissions.php6
-rw-r--r--edit_storage_inc.php5
-rw-r--r--plugins/storage.bitfile.php4
-rw-r--r--templates/attachment_uploader.tpl5
-rw-r--r--templates/attachment_uploader_inc.tpl2
-rw-r--r--templates/content_permissions.tpl2
-rw-r--r--templates/edit_storage.tpl2
-rw-r--r--templates/edit_storage_list.tpl8
-rw-r--r--templates/header_inc.tpl5
-rw-r--r--templates/libertypagination.tpl4
11 files changed, 24 insertions, 22 deletions
diff --git a/LibertySystem.php b/LibertySystem.php
index d6cabd7..0323b50 100755
--- a/LibertySystem.php
+++ b/LibertySystem.php
@@ -3,7 +3,7 @@
* System class for handling the liberty package
*
* @package liberty
-* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.92 2007/07/27 07:48:52 wjames5 Exp $
+* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.93 2007/10/10 18:07:17 wjames5 Exp $
* @author spider <spider@steelsun.com>
*/
@@ -41,6 +41,7 @@ define( 'LIBERTY_SERVICE_MAPS', 'map_display' );
define( 'LIBERTY_SERVICE_METADATA', 'metadata' );
define( 'LIBERTY_SERVICE_MENU', 'menu' );
define( 'LIBERTY_SERVICE_RATING', 'rating');
+define( 'LIBERTY_SERVICE_REBLOG', 'reblogging_rss_feeds');
define( 'LIBERTY_SERVICE_SEARCH', 'search');
define( 'LIBERTY_SERVICE_THEMES', 'themes');
define( 'LIBERTY_SERVICE_TAGS', 'tags');
diff --git a/content_permissions.php b/content_permissions.php
index 1b795f3..0c880eb 100644
--- a/content_permissions.php
+++ b/content_permissions.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
* @package liberty
* @subpackage functions
*/
@@ -98,7 +98,7 @@ if( $gBitThemes->isAjaxRequest() ) {
require_once $gBitSmarty->_get_plugin_filepath( 'function', 'biticon' );
$ret = '<a title="'.$contentPerms['groups'][$gid]['group_name']." :: ".$perm.'" '.
- 'href="javascript:ajax_updater('.
+ 'href="javascript:void(0);" onclick="BitAjax.updater('.
"'{$perm}{$gid}', ".
"'".LIBERTY_PKG_URL."content_permissions.php', ".
"'action={$action}&amp;content_id={$gContent->mContentId}&amp;perm={$perm}&amp;group_id={$gid}'".
@@ -108,6 +108,6 @@ if( $gBitThemes->isAjaxRequest() ) {
}
// enable ajaxed permission updating
-$gBitThemes->loadAjax( 'prototype' );
+$gBitThemes->loadAjax( 'mochikit' );
$gBitSystem->display( 'bitpackage:liberty/content_permissions.tpl', tra( 'Content Permissions' ));
?>
diff --git a/edit_storage_inc.php b/edit_storage_inc.php
index 648e80e..3a568d6 100644
--- a/edit_storage_inc.php
+++ b/edit_storage_inc.php
@@ -3,7 +3,7 @@
* edit_storage_inc
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.20 $
+ * @version $Revision: 1.21 $
* @package liberty
* @subpackage functions
*
@@ -59,7 +59,8 @@ $gBitSmarty->assign_by_ref( 'gLibertySystem', $gLibertySystem );
// seems like there should be a better way to do this -- maybe original assign should have been by reference?
$gBitSmarty->clear_assign( 'gContent' );
$gBitSmarty->assign( 'gContent', $gContent );
-$gBitThemes->loadAjax( 'prototype' );
+$gBitThemes->loadAjax( 'mochikit' );
+$gBitSmarty->assign( 'attachments_ajax', TRUE );
// output some stuff for ajax div
if( BitThemes::isAjaxRequest() ) {
diff --git a/plugins/storage.bitfile.php b/plugins/storage.bitfile.php
index 1e78802..f8d05a7 100644
--- a/plugins/storage.bitfile.php
+++ b/plugins/storage.bitfile.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.43 $
+ * @version $Revision: 1.44 $
* @package liberty
* @subpackage plugins_storage
*/
@@ -44,7 +44,7 @@ if( isset( $gBitSystem ) ) {
$divid = 0;
}
$pluginParams['edit_help'] = 'The file(s) will be uploaded to your personal storage area.<br />After selecting the file you want to upload an attachment ID will be displayed for you to use in your content.';
- $pluginParams['edit_field'] = '<input type="file" name="upload" size="40" id="upload" onchange="javascript:liberty_uploader(this, \'{$smarty.const.LIBERTY_PKG_URL}attachment_uploader.php\',\'{tr}Please wait for the current upload to finish.{/tr}\', \'liberty_upload_frame\');" />'.
+ $pluginParams['edit_field'] = '<input type="file" name="upload" size="40" id="upload" onchange="javascript:LibertyAttachment.uploader(this, \'{$smarty.const.LIBERTY_PKG_URL}attachment_uploader.php\',\'{tr}Please wait for the current upload to finish.{/tr}\', \'liberty_upload_frame\');" />'.
'{include file="bitpackage:liberty/attachment_uploader_inc.tpl"}';
}
}
diff --git a/templates/attachment_uploader.tpl b/templates/attachment_uploader.tpl
index bf451a9..c739142 100644
--- a/templates/attachment_uploader.tpl
+++ b/templates/attachment_uploader.tpl
@@ -1,10 +1,7 @@
{strip}
{if !empty($errors)}
<script type="text/javascript">
- function display_upload_errors() {ldelim}
- alert("Error with upload: {$errors}");
- {rdelim}
- addLoadHook(display_upload_errors);
+ addLoadHook(function(){ldelim} alert("Error with upload: {$errors}"); {rdelim});
</script>
{/if}
<div id="result_tab">
diff --git a/templates/attachment_uploader_inc.tpl b/templates/attachment_uploader_inc.tpl
index f6dd6d7..12b8852 100644
--- a/templates/attachment_uploader_inc.tpl
+++ b/templates/attachment_uploader_inc.tpl
@@ -12,7 +12,7 @@
{* Note! iFrame MUST not be display: none or Safari pops a window instead. *}
{* I am not dynamically creating the iFrame to give a warning for browsers with no iframe support. *}
-<iframe src="about:blank" id="liberty_upload_frame" name="liberty_upload_frame" onload="javascript:liberty_uploader_complete('liberty_upload_frame', 'edit_storage_list', 'upload');" style="position: absolute; left: -10000px;">
+<iframe src="about:blank" id="liberty_upload_frame" name="liberty_upload_frame" onload="javascript:LibertyAttachment.uploaderComplete('liberty_upload_frame', 'edit_storage_list', 'upload');" style="position: absolute; left: -10000px;">
<div class="warning">
{tr}iFrame support is required for AJAX uploads.{/tr}&nbsp;
{tr}You must save the content to upload an attachment.{/tr}
diff --git a/templates/content_permissions.tpl b/templates/content_permissions.tpl
index 2166db3..7e8767e 100644
--- a/templates/content_permissions.tpl
+++ b/templates/content_permissions.tpl
@@ -50,7 +50,7 @@
<td style="text-align:center">
{if $gBitThemes->isJavascriptEnabled()}
<span id="{$perm}{$groupId}">
- <a title="{$contentPerms.groups.$groupId.group_name} :: {$perm}" href="javascript:ajax_updater('{$perm}{$groupId}', '{$smarty.const.LIBERTY_PKG_URL}content_permissions.php', 'action={$action}&amp;content_id={$gContent->mContentId}&amp;perm={$perm}&amp;group_id={$groupId}')">
+ <a title="{$contentPerms.groups.$groupId.group_name} :: {$perm}" href="javascript:void(0);" onclick="BitAjax.updater('{$perm}{$groupId}', '{$smarty.const.LIBERTY_PKG_URL}content_permissions.php', 'action={$action}&amp;content_id={$gContent->mContentId}&amp;perm={$perm}&amp;group_id={$groupId}')">
{biticon iname=$size$icon iexplain="" iforce="icon"}
</a>
</span>
diff --git a/templates/edit_storage.tpl b/templates/edit_storage.tpl
index 4f762d9..37f7b36 100644
--- a/templates/edit_storage.tpl
+++ b/templates/edit_storage.tpl
@@ -22,7 +22,7 @@ viewing existing content that can be inserted into the contnet using
{attachment} or {content} or similar. there is no means to attach and detach
content anymore *}
{*if $gBitUser->hasPermission('p_liberty_attach_attachments') }
- <h2 class="clear"><a href="javascript:ajax_updater( 'attbrowser', '{$smarty.const.LIBERTY_PKG_URL}ajax_attachment_browser.php', 'ajax=true&amp;content_id={$gContent->mContentId}' );">{tr}Attachment Browser{/tr}</a></h2>
+ <h2 class="clear"><a href="javascript:void(0);" onclick="BitAjax.updater( 'attbrowser', '{$smarty.const.LIBERTY_PKG_URL}ajax_attachment_browser.php', 'ajax=true&amp;content_id={$gContent->mContentId}' );">{tr}Attachment Browser{/tr}</a></h2>
<noscript><div class="warning">{tr}The attachment browser only works with javascript enabled.{/tr}</div></noscript>
<div id="attbrowser" class="attbrowser"><p>{tr}Please click on the Attachement Browser link above to view available attachments.{/tr}</p></div>
{else}
diff --git a/templates/edit_storage_list.tpl b/templates/edit_storage_list.tpl
index 07a3723..bf8b1fd 100644
--- a/templates/edit_storage_list.tpl
+++ b/templates/edit_storage_list.tpl
@@ -41,14 +41,14 @@
{if $gBitUser->isAdmin() || ($storage.user_id == $gBitUser->mUserId && $gBitUser->hasPermission('p_liberty_delete_attachments') ) }
{if $attachmentBrowser}
<a href="javascript:
- ajax_updater('edit_storage_list', '{$attachmentActionBaseUrl}', 'deleteAttachment={$attachmentId}');
- ajax_updater('edit_storage_list_tab', '{$attachmentActionBaseUrl}', 'content_id={$gContent->mContentId}');">
+ BitAjax.updater('edit_storage_list', '{$attachmentActionBaseUrl}', 'deleteAttachment={$attachmentId}');
+ BitAjax.updater('edit_storage_list_tab', '{$attachmentActionBaseUrl}', 'content_id={$gContent->mContentId}');">
{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}
</a>
{elseif $libertyUploader || $gBitSystem->getConfig('liberty_attachment_style') == 'ajax'}
<a href="javascript:
- ajax_updater('edit_storage_list', '{$attachmentActionBaseUrl}', 'content_id={$gContent->mContentId}&amp;deleteAttachment={$attachmentId}{if empty($gContent->mContentId)}{foreach from=$gContent->mStorage key=key item=val}&amp;STORAGE[existing][{$val.attachment_id}]={$val.attachment_id}{/foreach}{/if}');
- ajax_updater('edit_storage_list_tab', '{$attachmentActionBaseUrl}', 'content_id={$gContent->mContentId}{if empty($gContent->mContentId)}{foreach from=$gContent->mStorage key=key item=val}&amp;STORAGE[existing][{$val.attachment_id}]={$val.attachment_id}{/foreach}{/if}');">
+ BitAjax.updater('edit_storage_list', '{$attachmentActionBaseUrl}', 'content_id={$gContent->mContentId}&amp;deleteAttachment={$attachmentId}{if empty($gContent->mContentId)}{foreach from=$gContent->mStorage key=key item=val}&amp;STORAGE[existing][{$val.attachment_id}]={$val.attachment_id}{/foreach}{/if}');
+ BitAjax.updater('edit_storage_list_tab', '{$attachmentActionBaseUrl}', 'content_id={$gContent->mContentId}{if empty($gContent->mContentId)}{foreach from=$gContent->mStorage key=key item=val}&amp;STORAGE[existing][{$val.attachment_id}]={$val.attachment_id}{/foreach}{/if}');">
{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}
</a>
{else}
diff --git a/templates/header_inc.tpl b/templates/header_inc.tpl
index 89f2382..aed1852 100644
--- a/templates/header_inc.tpl
+++ b/templates/header_inc.tpl
@@ -1,4 +1,4 @@
-{* $Header: /cvsroot/bitweaver/_bit_liberty/templates/header_inc.tpl,v 1.8 2007/06/13 15:19:54 wjames5 Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_liberty/templates/header_inc.tpl,v 1.9 2007/10/10 18:07:17 wjames5 Exp $ *}
{strip}
{if $structureInfo}
<link rel="index" title="{tr}Contents{/tr}" href="index.php?structure_id={$structureInfo.root_structure_id}" />
@@ -28,4 +28,7 @@
LibertyComment.BROWSER = "{$gBrowserInfo.browser}";
</script>
{/if}
+{if $attachments_ajax}
+ <script src="{$smarty.const.LIBERTY_PKG_URL}scripts/LibertyAttachment.js" type="text/javascript"></script>
+{/if}
{/strip} \ No newline at end of file
diff --git a/templates/libertypagination.tpl b/templates/libertypagination.tpl
index abf2683..f09ba96 100644
--- a/templates/libertypagination.tpl
+++ b/templates/libertypagination.tpl
@@ -2,7 +2,7 @@
<div class="pagination">
{if $pgnPage gt 1}
{if $ajaxId}
- <a href="javascript:ajax_updater( '{$ajaxId}', '{$smarty.const.LIBERTY_PKG_URL}ajax_attachment_browser.php', '{$pgnName}={$pgnPage-1}{$pgnVars}' );">&laquo;</a>&nbsp;
+ <a href="javascript:void(0);" onclick="BitAjax.ajaxUpdater( '{$ajaxId}', '{$smarty.const.LIBERTY_PKG_URL}ajax_attachment_browser.php', '{$pgnName}={$pgnPage-1}{$pgnVars}' );">&laquo;</a>&nbsp;
{else}
<a href="{$smarty.server.SCRIPT_URL}?{$pgnName}={$pgnPage-1}{$pgnVars}">&laquo;</a>&nbsp;
{/if}
@@ -14,7 +14,7 @@
{if $pgnPage lt $numPages}
{if $ajaxId}
- <a href="javascript:ajax_updater( '{$ajaxId}', '{$smarty.const.LIBERTY_PKG_URL}ajax_attachment_browser.php', '{$pgnName}={$pgnPage+1}{$pgnVars}' );">&raquo;</a>
+ <a href="javascript:void(0);" onclick="BitAjax.ajaxUpdater( '{$ajaxId}', '{$smarty.const.LIBERTY_PKG_URL}ajax_attachment_browser.php', '{$pgnName}={$pgnPage+1}{$pgnVars}' );">&raquo;</a>
{else}
&nbsp;<a href="{$smarty.server.SCRIPT_URL}?{$pgnName}={$pgnPage+1}{$pgnVars}">&raquo;</a>
{/if}