diff options
author | Igor Wiedler <igor@wiedler.ch> | 2012-04-07 18:27:30 +0200 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2012-04-07 18:27:30 +0200 |
commit | 24daef1aafb0a733c3428122d740fea17d4f34a0 (patch) | |
tree | 19338a7c549089437f2f9cb708f6afb8a26e733a /phpBB/adm/style | |
parent | 3963b39634225a68687cf1b817a47ae1eeb6ac79 (diff) | |
parent | 713e7129e2dfb1039f5198c03c8808c8410f434a (diff) | |
download | forums-24daef1aafb0a733c3428122d740fea17d4f34a0.tar forums-24daef1aafb0a733c3428122d740fea17d4f34a0.tar.gz forums-24daef1aafb0a733c3428122d740fea17d4f34a0.tar.bz2 forums-24daef1aafb0a733c3428122d740fea17d4f34a0.tar.xz forums-24daef1aafb0a733c3428122d740fea17d4f34a0.zip |
Merge branch 'develop' into feature/avatars
* develop: (335 commits)
[ticket/10575] Adding public visibility to the methods.
[ticket/10575] Fixing non-static access to static functions get_instance
[ticket/10547] User is not logged in as admin after installation
[ticket/10650] Revert merge of 'rahulr92/ticket/10650' into develop
[ticket/10650] Added checking for empty subjects
[ticket/10650] Corrected intendation
[ticket/10650]Added permission checking and utf8 functions
[ticket/10650] Cropped subject and inserted newline
[ticket/10650] Corrected space before true
[ticket/10650] Changed language files and forumlist
[ticket/10650] Added static sql files
[ticket/10650] Displaying last topic on forum list
[ticket/10760] Fix numbering in php fun facts.
[ticket/10760] Value must be quoted as it might be two words.
[ticket/10760] PHP is great. This commit is the proof.
[ticket/10760] Catch both versions of parse error output in php.
[ticket/10607] Added 'Powered by' translation string.
[ticket/10760] Account for display_errors=stderr in pre-commit hook.
[ticket/10760] Quote PHP_BIN when using it.
[ticket/10760] Use echo -e only if echo understands -e.
...
Diffstat (limited to 'phpBB/adm/style')
-rw-r--r-- | phpBB/adm/style/acp_attachments.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/acp_bbcodes.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/acp_bots.html | 4 | ||||
-rw-r--r-- | phpBB/adm/style/acp_forums.html | 26 | ||||
-rw-r--r-- | phpBB/adm/style/acp_groups.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/acp_icons.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/acp_main.html | 17 | ||||
-rw-r--r-- | phpBB/adm/style/acp_modules.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/acp_permission_roles.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/acp_profile.html | 4 | ||||
-rw-r--r-- | phpBB/adm/style/acp_ranks.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/acp_reasons.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/acp_styles.html | 478 | ||||
-rw-r--r-- | phpBB/adm/style/acp_words.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/admin.css | 71 | ||||
-rw-r--r-- | phpBB/adm/style/ajax.js | 135 | ||||
-rw-r--r-- | phpBB/adm/style/overall_footer.html | 21 | ||||
-rw-r--r-- | phpBB/adm/style/simple_footer.html | 2 |
18 files changed, 389 insertions, 387 deletions
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 33ef8062a6..c2f8b34792 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -248,7 +248,7 @@ <!-- ELSE --><br /><span>» {L_ALLOWED_IN_PM_POST}</span><!-- ENDIF --> </td> <td>{groups.CATEGORY}</td> - <td align="center" valign="middle" style="white-space: nowrap;"> <a href="{groups.U_EDIT}">{ICON_EDIT}</a> <a href="{groups.U_DELETE}">{ICON_DELETE}</a> </td> + <td align="center" valign="middle" style="white-space: nowrap;"> <a href="{groups.U_EDIT}">{ICON_EDIT}</a> <a href="{groups.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a> </td> </tr> <!-- END groups --> </tbody> diff --git a/phpBB/adm/style/acp_bbcodes.html b/phpBB/adm/style/acp_bbcodes.html index b85e8eca81..5939af24ae 100644 --- a/phpBB/adm/style/acp_bbcodes.html +++ b/phpBB/adm/style/acp_bbcodes.html @@ -101,7 +101,7 @@ <!-- BEGIN bbcodes --> <!-- IF bbcodes.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> <td style="text-align: center;">{bbcodes.BBCODE_TAG}</td> - <td style="text-align: right; width: 40px;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}">{ICON_DELETE}</a></td> + <td style="text-align: right; width: 40px;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a></td> </tr> <!-- BEGINELSE --> <tr class="row3"> diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html index 886005caa3..87679fc33a 100644 --- a/phpBB/adm/style/acp_bots.html +++ b/phpBB/adm/style/acp_bots.html @@ -76,9 +76,9 @@ <!-- IF bots.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> <td style="width: 50%;">{bots.BOT_NAME}</td> <td style="width: 15%; white-space: nowrap;" align="center"> {bots.LAST_VISIT} </td> - <td style="text-align: center;"> <a href="{bots.U_ACTIVATE_DEACTIVATE}">{bots.L_ACTIVATE_DEACTIVATE}</a> </td> + <td style="text-align: center;"> <a href="{bots.U_ACTIVATE_DEACTIVATE}" data-ajax="activate_deactivate">{bots.L_ACTIVATE_DEACTIVATE}</a> </td> <td style="text-align: center;"> <a href="{bots.U_EDIT}">{L_EDIT}</a> </td> - <td style="text-align: center;"> <a href="{bots.U_DELETE}">{L_DELETE}</a> </td> + <td style="text-align: center;"> <a href="{bots.U_DELETE}" data-ajax="row_delete">{L_DELETE}</a> </td> <td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{bots.BOT_ID}" /></td> </tr> <!-- END bots --> diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index 447c0ce466..048a24a328 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -443,7 +443,7 @@ <col class="row1" /><col class="row1" /><col class="row2" /> <tbody> <!-- BEGIN forums --> - <tr> + <tr data-down="{forums.U_MOVE_DOWN}" data-up="{forums.U_MOVE_UP}"> <td style="width: 5%; text-align: center;">{forums.FOLDER_IMAGE}</td> <td> <!-- IF forums.FORUM_IMAGE --><div style="float: {S_CONTENT_FLOW_BEGIN}; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF --> @@ -453,17 +453,17 @@ </td> <td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;"> <!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW --> - {ICON_MOVE_UP_DISABLED} - <a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> + <span class="up">{ICON_MOVE_UP_DISABLED}</span> + <span class="down"><a href="{forums.U_MOVE_DOWN}" data-ajax="forum_down">{ICON_MOVE_DOWN}</a></span> <!-- ELSEIF not forums.S_FIRST_ROW && not forums.S_LAST_ROW --> - <a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a> - <a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> + <span class="up"><a href="{forums.U_MOVE_UP}" data-ajax="forum_up">{ICON_MOVE_UP}</a></span> + <span class="down"><a href="{forums.U_MOVE_DOWN}" data-ajax="forum_down">{ICON_MOVE_DOWN}</a></span> <!-- ELSEIF forums.S_LAST_ROW && not forums.S_FIRST_ROW --> - <a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a> - {ICON_MOVE_DOWN_DISABLED} + <span class="up"><a href="{forums.U_MOVE_UP}" data-ajax="forum_up">{ICON_MOVE_UP}</a></span> + <span class="down">{ICON_MOVE_DOWN_DISABLED}</span> <!-- ELSE --> - {ICON_MOVE_UP_DISABLED} - {ICON_MOVE_DOWN_DISABLED} + <span class="up">{ICON_MOVE_UP_DISABLED}</span> + <span class="down">{ICON_MOVE_DOWN_DISABLED}</span> <!-- ENDIF --> <a href="{forums.U_EDIT}">{ICON_EDIT}</a> <!-- IF not forums.S_FORUM_LINK --> @@ -500,6 +500,14 @@ </fieldset> </form> + <div class="hidden"> + <a class="template-up-img" href="#">{ICON_MOVE_UP}</a> + <span class="template-up-img-disabled">{ICON_MOVE_UP_DISABLED}</span> + + <a class="template-down-img" href="#">{ICON_MOVE_DOWN}</a> + <span class="template-down-img-disabled">{ICON_MOVE_DOWN_DISABLED}</span> + </div> + <!-- ENDIF --> <!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index 1c78c0c344..42cb434ad3 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -330,7 +330,7 @@ <td style="text-align: center;">{groups.TOTAL_MEMBERS}</td> <td style="text-align: center;"><a href="{groups.U_EDIT}">{L_SETTINGS}</a></td> <td style="text-align: center;"><a href="{groups.U_LIST}">{L_MEMBERS}</a></td> - <td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL and groups.U_DELETE --><a href="{groups.U_DELETE}">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td> + <td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL and groups.U_DELETE --><a href="{groups.U_DELETE}" data-ajax="row_delete">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td> </tr> <!-- ENDIF --> <!-- END groups --> diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html index 85b5343666..a8864d42f7 100644 --- a/phpBB/adm/style/acp_icons.html +++ b/phpBB/adm/style/acp_icons.html @@ -245,7 +245,7 @@ <td style="text-align: right; white-space: nowrap;"> <!-- IF items.S_FIRST_ROW and not PREVIOUS_PAGE -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF --> <!-- IF items.S_LAST_ROW and not NEXT_PAGE -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF --> - <a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}">{ICON_DELETE}</a> + <a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a> </td> </tr> <!-- BEGINELSE --> diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index 11f7fedd38..d9f833d878 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -152,35 +152,35 @@ <fieldset> <legend>{L_STATISTIC_RESYNC_OPTIONS}</legend> - <form id="action_online_form" method="post" action="{U_ACTION}"> + <form id="action_online_form" method="post" action="{U_ACTION}" data-ajax="true"> <dl> <dt><label for="action_online">{L_RESET_ONLINE}</label><br /><span> </span></dt> <dd><input type="hidden" name="action" value="online" /><input class="button2" type="submit" id="action_online" name="action_online" value="{L_RUN}" /></dd> </dl> </form> - <form id="action_date_form" method="post" action="{U_ACTION}"> + <form id="action_date_form" method="post" action="{U_ACTION}" data-ajax="true"> <dl> <dt><label for="action_date">{L_RESET_DATE}</label><br /><span> </span></dt> <dd><input type="hidden" name="action" value="date" /><input class="button2" type="submit" id="action_date" name="action_date" value="{L_RUN}" /></dd> </dl> </form> - <form id="action_stats_form" method="post" action="{U_ACTION}"> + <form id="action_stats_form" method="post" action="{U_ACTION}" data-ajax="true"> <dl> <dt><label for="action_stats">{L_RESYNC_STATS}</label><br /><span>{L_RESYNC_STATS_EXPLAIN}</span></dt> <dd><input type="hidden" name="action" value="stats" /><input class="button2" type="submit" id="action_stats" name="action_stats" value="{L_RUN}" /></dd> </dl> </form> - <form id="action_user_form" method="post" action="{U_ACTION}"> + <form id="action_user_form" method="post" action="{U_ACTION}" data-ajax="true"> <dl> <dt><label for="action_user">{L_RESYNC_POSTCOUNTS}</label><br /><span>{L_RESYNC_POSTCOUNTS_EXPLAIN}</span></dt> <dd><input type="hidden" name="action" value="user" /><input class="button2" type="submit" id="action_user" name="action_user" value="{L_RUN}" /></dd> </dl> </form> - <form id="action_db_track_form" method="post" action="{U_ACTION}"> + <form id="action_db_track_form" method="post" action="{U_ACTION}" data-ajax="true"> <dl> <dt><label for="action_db_track">{L_RESYNC_POST_MARKING}</label><br /><span>{L_RESYNC_POST_MARKING_EXPLAIN}</span></dt> <dd><input type="hidden" name="action" value="db_track" /><input class="button2" type="submit" id="action_db_track" name="action_db_track" value="{L_RUN}" /></dd> @@ -188,19 +188,20 @@ </form> <!-- IF S_FOUNDER --> - <form id="action_purge_sessions_form" method="post" action="{U_ACTION}"> + <form id="action_purge_sessions_form" method="post" action="{U_ACTION}" data-ajax="true"> <dl> <dt><label for="action_purge_sessions">{L_PURGE_SESSIONS}</label><br /><span>{L_PURGE_SESSIONS_EXPLAIN}</span></dt> <dd><input type="hidden" name="action" value="purge_sessions" /><input class="button2" type="submit" id="action_purge_sessions" name="action_purge_sessions" value="{L_RUN}" /></dd> </dl> </form> - <form id="action_purge_cache_form" method="post" action="{U_ACTION}"> + <!-- ENDIF --> + + <form id="action_purge_cache_form" method="post" action="{U_ACTION}" data-ajax="true"> <dl> <dt><label for="action_purge_cache">{L_PURGE_CACHE}</label><br /><span>{L_PURGE_CACHE_EXPLAIN}</span></dt> <dd><input type="hidden" name="action" value="purge_cache" /><input class="button2" type="submit" id="action_purge_cache" name="action_purge_cache" value="{L_RUN}" /></dd> </dl> </form> - <!-- ENDIF --> </fieldset> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html index 3f1c0bf50b..6c4645e80c 100644 --- a/phpBB/adm/style/acp_modules.html +++ b/phpBB/adm/style/acp_modules.html @@ -164,7 +164,7 @@ {ICON_MOVE_DOWN_DISABLED} <!-- ENDIF --> <a href="{modules.U_EDIT}">{ICON_EDIT}</a> - <a href="{modules.U_DELETE}">{ICON_DELETE}</a> + <a href="{modules.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a> </td> </tr> <!-- END modules --> diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html index 658d8dd0c8..2ac77af25d 100644 --- a/phpBB/adm/style/acp_permission_roles.html +++ b/phpBB/adm/style/acp_permission_roles.html @@ -174,7 +174,7 @@ {ICON_MOVE_DOWN_DISABLED} <!-- ENDIF --> <a href="{roles.U_EDIT}" title="{L_EDIT_ROLE}">{ICON_EDIT}</a> - <a href="{roles.U_REMOVE}" title="{L_REMOVE_ROLE}">{ICON_DELETE}</a> + <a href="{roles.U_REMOVE}" title="{L_REMOVE_ROLE}" data-ajax="row_delete">{ICON_DELETE}</a> </td> </tr> <!-- END roles --> diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index 0ac0d78a64..4a6df768a8 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -195,7 +195,7 @@ <td>{fields.FIELD_IDENT}</td> <td>{fields.FIELD_TYPE}</td> - <td style="text-align: center;"><a href="{fields.U_ACTIVATE_DEACTIVATE}">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_TRANSLATE}" style="color: red;">{L_TRANSLATE}</a><!-- ENDIF --></td> + <td style="text-align: center;"><a href="{fields.U_ACTIVATE_DEACTIVATE}" data-ajax="activate_deactivate">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_TRANSLATE}" style="color: red;">{L_TRANSLATE}</a><!-- ENDIF --></td> <td style="width: 80px; text-align: right; white-space: nowrap;"> <!-- IF fields.S_FIRST_ROW && not fields.S_LAST_ROW --> @@ -213,7 +213,7 @@ <!-- ELSE --> {ICON_EDIT_DISABLED} <!-- ENDIF --> - <a href="{fields.U_DELETE}">{ICON_DELETE}</a> + <a href="{fields.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a> </td> </tr> diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html index 2f77a256b1..7fb7da7095 100644 --- a/phpBB/adm/style/acp_ranks.html +++ b/phpBB/adm/style/acp_ranks.html @@ -80,7 +80,7 @@ <td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" /><!-- ELSE --> - <!-- ENDIF --></td> <td style="text-align: center;">{ranks.RANK_TITLE}</td> <td style="text-align: center;"><!-- IF ranks.S_SPECIAL_RANK --> - <!-- ELSE -->{ranks.MIN_POSTS}<!-- ENDIF --></td> - <td style="text-align: center;"><a href="{ranks.U_EDIT}">{ICON_EDIT}</a> <a href="{ranks.U_DELETE}">{ICON_DELETE}</a></td> + <td style="text-align: center;"><a href="{ranks.U_EDIT}">{ICON_EDIT}</a> <a href="{ranks.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a></td> </tr> <!-- END ranks --> </tbody> diff --git a/phpBB/adm/style/acp_reasons.html b/phpBB/adm/style/acp_reasons.html index 522aec5930..7cf2cce4c9 100644 --- a/phpBB/adm/style/acp_reasons.html +++ b/phpBB/adm/style/acp_reasons.html @@ -99,7 +99,7 @@ <!-- ENDIF --> <a href="{reasons.U_EDIT}">{ICON_EDIT}</a> <!-- IF reasons.U_DELETE --> - <a href="{reasons.U_DELETE}">{ICON_DELETE}</a> + <a href="{reasons.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a> <!-- ELSE --> {ICON_DELETE_DISABLED} <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index dc89aa247a..b09cbafc95 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -2,399 +2,167 @@ <a id="maincontent"></a> -<!-- IF S_DELETE --> - - <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a> - - <h1>{L_TITLE}</h1> - - <p>{L_EXPLAIN}</p> - - <form id="acp_styles" method="post" action="{U_ACTION}"> - - <fieldset> - <legend>{L_TITLE}</legend> - <dl> - <dt><label>{L_NAME}:</label></dt> - <dd><strong>{NAME}</strong></dd> - </dl> - <dl> - <dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt> - <dd><select id="new_id" name="new_id">{S_REPLACE_OPTIONS}</select></dd> - </dl> - <!-- IF S_DELETE_STYLE --> - <hr /> - <dl> - <dt><label for="new_template_id">{L_DELETE_TEMPLATE}:</label><br /><span>{L_REPLACE_TEMPLATE_EXPLAIN}</span></dt> - <dd><select id="new_template_id" name="new_template_id">{S_REPLACE_TEMPLATE_OPTIONS}</select></dd> - </dl> - <dl> - <dt><label for="new_theme_id">{L_DELETE_THEME}:</label><br /><span>{L_REPLACE_THEME_EXPLAIN}</span></dt> - <dd><select id="new_theme_id" name="new_theme_id">{S_REPLACE_THEME_OPTIONS}</select></dd> - </dl> +<!-- IF S_CONFIRM_ACTION --> +<form id="confirm" method="post" action="{S_CONFIRM_ACTION}"> + +<fieldset> + <h1>{MESSAGE_TITLE}</h1> + <p>{MESSAGE_TEXT}</p> + <!-- IF S_CONFIRM_DELETE --> + <label><input type="checkbox" class="checkbox" name="confirm_delete_files" /> {L_DELETE_FROM_FS}</label> <!-- ENDIF --> - <p class="quick"> - <input class="button1" type="submit" name="update" value="{L_DELETE}" /> - {S_FORM_TOKEN} - </p> - </fieldset> - </form> - -<!-- ELSEIF S_EDIT_TEMPLATE or S_EDIT_THEME --> + {S_HIDDEN_FIELDS} - <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a> + <div style="text-align: center;"> + <input type="submit" name="confirm" value="{L_YES}" class="button2" /> + <input type="submit" name="cancel" value="{L_NO}" class="button2" /> + </div> - <h1>{L_EDIT}</h1> +</fieldset> + +</form> +<!-- ELSE --> - <p>{L_EDIT_EXPLAIN}</p> +<!-- IF L_TITLE --><h1>{L_TITLE}</h1><!-- ENDIF --> - <p>{L_SELECTED}: <strong>{SELECTED_TEMPLATE}</strong></p> +<!-- IF L_EXPLAIN --><p>{L_EXPLAIN}</p><!-- ENDIF --> - <form id="acp_styles" method="post" action="{U_ACTION}"> +<form id="acp_styles" method="post" action="{U_ACTION}"> +{S_HIDDEN_FIELDS} +{S_FORM_TOKEN} - <!-- IF S_EDIT_TEMPLATE or (S_EDIT_THEME and not S_THEME_IN_DB) --> +<!-- IF S_STYLE_DETAILS --> + <input type="hidden" name="id" value="{STYLE_ID}" /> <fieldset> - <legend>{L_SELECT}</legend> <dl> - <dt><label for="template_file">{L_FILE}:</label></dt> - <dd><select id="template_file" name="template_file" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_TEMPLATES}</select> <input class="button2" type="submit" value="{L_SELECT}" /></dd> + <dt><label for="name">{L_STYLE_NAME}:</label></dt> + <dd><input type="text" id="name" name="style_name" value="{STYLE_NAME}" /></dd> </dl> - {S_FORM_TOKEN} - </fieldset> - <!-- ENDIF --> - </form> - - <!-- IF TEMPLATE_FILE or (S_EDIT_THEME and S_THEME_IN_DB) --> - <script type="text/javascript" defer="defer"> - // <![CDATA[ - - function change_editor_height(height) - { - height = Number(height); - - if (isNaN(height)) - { - return; - } - - editor = document.getElementById('template_data'); - editor.rows = Math.max(5, Math.min(height, 999)); - - append_text_rows('acp_styles', height); - append_text_rows('acp_template', height); - } - - function append_text_rows(form_name, value) - { - value = Number(value); - - if (isNaN(value)) - { - return; - } - - url = document.getElementById(form_name).action; - - // Make sure & is actually... & - url = url.replace(/&/g, '&'); - - var_start = url.indexOf('&text_rows='); - if (var_start == -1) - { - document.getElementById(form_name).action = url + "&text_rows=" + value; - } - else - { - url_start = url.substring(0, var_start + 1); - var_end = url.substring(var_start + 1).indexOf('&'); - if (var_end == -1) - { - document.getElementById(form_name).action = url_start + "text_rows=" + value; - } - else - { - document.getElementById(form_name).action = url_start + url.substring(var_end + var_start + 2) + "&text_rows=" + value; - } - } - } - - // ]]> - </script> - - <form id="acp_template" method="post" action="{U_ACTION}"> - - <fieldset> - <legend>{L_EDITOR}</legend> - <!-- IF S_EDIT_TEMPLATE or (S_EDIT_THEME and not S_THEME_IN_DB) --> - <dl> - <dt><label>{L_SELECTED_FILE}:</label></dt> - <dd>{TEMPLATE_FILE}</dd> - </dl> - <!-- ENDIF --> - <dl> - <dt><label for="text_rows">{L_EDITOR_HEIGHT}:</label></dt> - <dd><input id="text_rows" type="text" maxlength="3" value="{TEXT_ROWS}" /> <input class="button2" type="button" name="update" onclick="change_editor_height(this.form.text_rows.value);" value="{L_UPDATE}" /></dd> - </dl> - <textarea id="template_data" name="template_data" style="font-family:'Courier New', monospace;font-size:9pt;line-height:125%;width:100%;" cols="80" rows="{TEXT_ROWS}">{TEMPLATE_DATA}</textarea> - </fieldset> - - <fieldset class="submit-buttons"> - <legend>{L_SUBMIT}</legend> - {S_HIDDEN_FIELDS} - {S_FORM_TOKEN} - <input class="button1" id="save" type="submit" name="save" value="{L_SUBMIT}" /> - </fieldset> - </form> - <!-- ENDIF --> - -<!-- ELSEIF S_CACHE --> - - <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a> - - <h1>{L_TEMPLATE_CACHE}</h1> - - <p>{L_TEMPLATE_CACHE_EXPLAIN}</p> - - <form id="acp_styles" method="post" action="{U_ACTION}"> - <fieldset class="tabulated"> - <legend>{L_TEMPLATE_CACHE}</legend> - - <table cellspacing="1"> - <thead> - <tr> - <th>{L_CACHE_FILENAME}</th> - <th>{L_CACHE_FILESIZE}</th> - <th>{L_CACHE_CACHED}</th> - <th>{L_CACHE_MODIFIED}</th> - <th>{L_MARK}</th> - </tr> - </thead> - <tbody> - <!-- BEGIN file --> - <!-- IF file.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> - <td><a href="{file.U_VIEWSOURCE}" onclick="popup(this.href, 750, 550, '_source'); return false;">{file.FILENAME_PATH}</a></td> - <td>{file.FILESIZE}</td> - <td>{file.CACHED}</td> - <td>{file.MODIFIED}</td> - <td><input type="checkbox" class="radio" name="delete[]" value="{file.FILENAME}" /></td> - </tr> - <!-- BEGINELSE --> - <tr class="row1"> - <td colspan="5">{L_TEMPLATE_CACHE_EMPTY}</td> - </tr> - <!-- END file --> - </tbody> - </table> - - <p class="quick"> - <span class="small"><a href="#" onclick="marklist('acp_styles', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('acp_styles', 'delete', false); return false;">{L_UNMARK_ALL}</a></span><br /> - {S_FORM_TOKEN} - <input class="button1" type="submit" id="submit" name="submit" value="{L_DELETE_MARKED}" /> - </p> - </fieldset> - </form> - -<!-- ELSEIF S_EXPORT --> - - <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a> - - <h1>{L_TITLE}</h1> - - <p>{L_EXPLAIN}</p> - - <!-- IF S_ERROR_MSG --> - <div class="errorbox"> - <h3>{L_WARNING}</h3> - <p>{ERROR_MSG}</p> - </div> - <!-- ENDIF --> - - <form id="acp_styles" method="post" action="{U_ACTION}"> - - <fieldset> - <legend>{L_TITLE}</legend> <dl> - <dt><label>{L_NAME}:</label></dt> - <dd><strong>{NAME}</strong></dd> + <dt><label>{L_STYLE_PATH}</label></dt> + <dd><strong>{STYLE_PATH}</strong></dd> + </dl> + <dl> + <dt><label for="name">{L_COPYRIGHT}:</label></dt> + <dd><strong>{STYLE_COPYRIGHT}</strong></dd> </dl> - <!-- IF S_STYLE --> - <dl> - <dt><label for="inc_template">{L_INCLUDE_TEMPLATE}:</label></dt> - <dd><label><input type="radio" class="radio" id="inc_template" name="inc_template" value="1" checked="checked" /> {L_YES}</label> - <label><input type="radio" class="radio" name="inc_template" value="0" /> {L_NO}</label></dd> - </dl> - <dl> - <dt><label for="inc_theme">{L_INCLUDE_THEME}:</label></dt> - <dd><label><input type="radio" class="radio" id="inc_theme" name="inc_theme" value="1" checked="checked" /> {L_YES}</label> - <label><input type="radio" class="radio" name="inc_theme" value="0" /> {L_NO}</label></dd> - </dl> - <!-- ENDIF --> <dl> - <dt><label for="store">{L_DOWNLOAD_STORE}:</label><br /><span>{L_DOWNLOAD_STORE_EXPLAIN}</span></dt> - <dd><label><input type="radio" class="radio" id="store" name="store" value="1" checked="checked" /> {L_EXPORT_STORE}</label> - <label><input type="radio" class="radio" name="store" value="0" /> {L_EXPORT_DOWNLOAD}</label></dd> + <dt><label for="style_parent">{L_INHERITING_FROM}:</label></dt> + <dd><select id="style_parent" name="style_parent"> + <option value=""<!-- IF STYLE_PARENT == 0 --> selected="selected"<!-- ENDIF -->> - </option> + <!-- BEGIN parent_styles --> + <option value="{parent_styles.STYLE_ID}"<!-- IF parent_styles.STYLE_ID == STYLE_PARENT --> selected="selected"<!-- ENDIF -->>{parent_styles.SPACER}{parent_styles.STYLE_NAME}</option> + <!-- END parent_styles --> + </select></dd> </dl> <dl> - <dt><label for="format">{L_ARCHIVE_FORMAT}:</label></dt> - <dd>{FORMAT_BUTTONS}</dd> + <dt><label for="style_active">{L_STYLE_ACTIVE}:</label></dt> + <dd><label><input type="radio" class="radio" name="style_active" value="1"<!-- IF S_STYLE_ACTIVE --> id="style_active" checked="checked"<!-- ENDIF --> /> {L_YES}</label> + <label><input type="radio" class="radio" name="style_active" value="0"<!-- IF not S_STYLE_ACTIVE --> id="style_active" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd> </dl> + <!-- IF not S_STYLE_DEFAULT --> + <dl> + <dt><label for="style_default">{L_STYLE_DEFAULT}:</label></dt> + <dd><label><input type="radio" class="radio" name="style_default" value="1" /> {L_YES}</label> + <label><input type="radio" class="radio" id="style_default" name="style_default" value="0" checked="checked" /> {L_NO}</label></dd> + </dl> + <!-- ENDIF --> + </fieldset> - <p class="quick"> - {S_FORM_TOKEN} + <fieldset class="submit-buttons"> + <legend>{L_SUBMIT}</legend> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> - </p> + <a href="{U_ACTION}" class="button2">{L_BACK}</a> + {S_FORM_TOKEN} </fieldset> +<!-- ENDIF --> - - </form> - -<!-- ELSEIF S_FRONTEND --> - - <h1>{L_TITLE}</h1> - - <p>{L_EXPLAIN}</p> - - <!-- IF S_STYLE --> <!-- DEFINE $COLSPAN = 5 --> <!-- ELSE --> <!-- DEFINE $COLSPAN = 4 --> <!-- ENDIF --> - +<!-- IF .styles_list --> <table cellspacing="1"> - <col class="row1" /><!-- IF S_STYLE --><col class="row1" /><!-- ENDIF --><col class="row2" /><col class="row2" /> <thead> <tr> - <th>{L_NAME}</th> - <!-- IF S_STYLE --><th>{L_STYLE_USED_BY}</th><!-- ENDIF --> - <th>{L_OPTIONS}</th> - <th>{L_ACTIONS}</th> + <th>{L_STYLE_NAME}</th> + <!-- IF not STYLES_LIST_HIDE_COUNT --><th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_USED_BY}</th><!-- ENDIF --> + <th width="25%" style="white-space: nowrap; text-align: center;">{L_ACTIONS}</th> + {STYLES_LIST_EXTRA} + <th> </th> </tr> </thead> - <tbody> - <tr> - <td class="row3" colspan="{$COLSPAN}"><strong>{L_INSTALLED}</strong></td> - </tr> - <!-- BEGIN installed --> - <!-- IF installed.S_INACTIVE and not $INACTIVE_STYLES --> - <!-- DEFINE $INACTIVE_STYLES = 1 --> - <tr> - <td class="row3" colspan="{$COLSPAN}"><strong>{L_INACTIVE_STYLES}</strong></td> - </tr> - <!-- ENDIF --> - <tr> - <td><strong>{installed.NAME}</strong><!-- IF installed.S_DEFAULT_STYLE --> *<!-- ENDIF --></td> - <!-- IF S_STYLE --> - <td style="text-align: center;">{installed.STYLE_COUNT}</td> + <!-- BEGIN styles_list --> + <tbody id="styles-list-{styles_list.S_ROW_COUNT}"> + <tr<!-- IF styles_list.STYLE_ID and not styles_list.STYLE_ACTIVE --> class="row-inactive"<!-- ENDIF -->> + <!-- IF styles_list.LEVEL is odd --> + <!-- IF $ROW_CLASS == 'row1a' --><!-- DEFINE $ROW_CLASS = 'row1b' --><!-- ELSE --><!-- DEFINE $ROW_CLASS = 'row1a' --><!-- ENDIF --> + <!-- ELSE --> + <!-- IF $ROW_CLASS == 'row2a' --><!-- DEFINE $ROW_CLASS = 'row2b' --><!-- ELSE --><!-- DEFINE $ROW_CLASS = 'row2a' --><!-- ENDIF --> <!-- ENDIF --> - <td style="text-align: center;"> - {installed.S_OPTIONS} - </td> - <td style="text-align: center;"> - <!-- IF S_STYLE --> - <a href="{installed.U_STYLE_ACT_DEACT}">{installed.L_STYLE_ACT_DEACT}</a> | + <td class="{$ROW_CLASS}" style="padding-left: {styles_list.PADDING}px;"> + <!-- IF styles_list.STYLE_ID and styles_list.COMMENT == '' and styles_list.STYLE_ACTIVE --> + <div class="default-style" style="display: none; float: right;"> + <input class="radio" type="radio" name="default" value="{styles_list.STYLE_ID}"<!-- IF styles_list.DEFAULT --> checked="checked"<!-- ELSE --><!-- DEFINE $S_DEFAULT = 1 --><!-- ENDIF --> title="{L_STYLE_DEFAULT}" /> + </div> + <!-- ENDIF --> + <!-- IF styles_list.DEFAULT or styles_list.SHOW_COPYRIGHT --> + <strong>{styles_list.STYLE_NAME}</strong> + <!-- IF styles_list.SHOW_COPYRIGHT and styles_list.COMMENT == '' --><span><br />{styles_list.STYLE_COPYRIGHT}</span><!-- ENDIF --> + <!-- ELSE --> + <span>{styles_list.STYLE_NAME}</span> <!-- ENDIF --> - {installed.S_ACTIONS} - <!-- IF S_STYLE --> - | <a href="{installed.U_PREVIEW}">{L_PREVIEW}</a> + <!-- IF styles_list.COMMENT != '' --> + <span class="error"><br />{styles_list.COMMENT}</span> + <!-- ENDIF --> + <!-- IF not styles_list.STYLE_ID and styles_list.COMMENT == '' --> + <span class="style-path"><br />{L_STYLE_PATH} {styles_list.STYLE_PATH_FULL}</span> + <!-- ENDIF --> + </td> + <!-- IF not STYLES_LIST_HIDE_COUNT --> + <td class="{$ROW_CLASS}" style="text-align: center;">{styles_list.USERS}</td> + <!-- ENDIF --> + <td class="{$ROW_CLASS}" style="text-align: center;"> + <!-- BEGIN actions --> + <!-- IF styles_list.actions.S_ROW_COUNT > 0 --> | <!-- ENDIF --> + <!-- IF styles_list.actions.U_ACTION --> + <a href="{styles_list.actions.U_ACTION}"{styles_list.actions.U_ACTION_ATTR}>{styles_list.actions.L_ACTION}</a> + <!-- ENDIF --> + {styles_list.actions.HTML} + <!-- END actions --> + </td> + {styles_list.EXTRA} + <td class="{$ROW_CLASS}" width="20" style="text-align: center;"> + <!-- IF styles_list.STYLE_ID --> + <input class="checkbox" type="checkbox" name="ids[]" value="{styles_list.STYLE_ID}" /> + <!-- ELSE --> + <!-- IF styles_list.COMMENT != '' --> + + <!-- ELSE --> + <input class="checkbox" type="checkbox" name="dirs[]" value="{styles_list.STYLE_PATH}" /> + <!-- ENDIF --> <!-- ENDIF --> </td> </tr> - <!-- END installed --> - <tr> - <td class="row3" colspan="{$COLSPAN}"><strong>{L_UNINSTALLED}</strong></td> - </tr> - <!-- IF not .uninstalled --> - <tr> - <td class="row1" colspan="{$COLSPAN}" style="text-align: center;">{L_NO_UNINSTALLED}</td> - </tr> - <!-- ENDIF --> - <!-- BEGIN uninstalled --> - <tr> - <td<!-- IF S_STYLE --> colspan="2"<!-- ENDIF -->><strong>{uninstalled.NAME}</strong><br /><span>{L_COPYRIGHT}: {uninstalled.COPYRIGHT}</span></td> - <td style="text-align: center;" colspan="2"><a href="{uninstalled.U_INSTALL}">{L_INSTALL}</a></td> - </tr> - <!-- END uninstalled --> </tbody> + <!-- END styles_list --> </table> +<!-- ENDIF --> - <!-- IF S_STYLE --> - <form id="acp_styles" method="post" action="{U_ACTION}"> - - <fieldset class="quick"> - <legend>{L_CREATE}</legend> - {L_CREATE}: <input type="text" name="name" value="" /> {L_FROM} <select name="basis">{S_BASIS_OPTIONS}</select> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" /> - </fieldset> - - </form> - <!-- ENDIF --> - -<!-- ELSEIF S_DETAILS --> - - <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a> - - <h1>{L_TITLE}</h1> - - <p>{L_EXPLAIN}</p> - - <!-- IF S_ERROR_MSG --> - <div class="errorbox"> - <h3>{L_WARNING}</h3> - <p>{ERROR_MSG}</p> - </div> - <!-- ENDIF --> - - <form id="acp_styles" method="post" action="{U_ACTION}"> - - <fieldset> - <legend>{L_TITLE}</legend> - <dl> - <dt><label for="name">{L_NAME}:</label></dt> - <dd><!-- IF S_INSTALL --><strong id="name">{NAME}</strong><!-- ELSE --><input type="text" id="name" name="name" value="{NAME}" /><!-- ENDIF --></dd> - </dl> - <dl> - <dt><label for="copyright">{L_COPYRIGHT}:</label></dt> - <dd><!-- IF S_INSTALL --><strong id="copyright">{COPYRIGHT}</strong><!-- ELSE --><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /><!-- ENDIF --></dd> - </dl> - <!-- IF S_SUPERTEMPLATE --> - <dl> - <dt><label for="inheriting">{L_INHERITING_FROM}:</label></dt> - <dd><strong id="inheriting">{S_SUPERTEMPLATE}</strong></dd> - </dl> - <!-- ENDIF --> - <!-- IF S_STYLE and not S_BASIS --> - <dl> - <dt><label for="template_id">{L_STYLE_TEMPLATE}:</label></dt> - <dd><!-- IF S_INSTALL --><strong id="template_id">{TEMPLATE_NAME}</strong><!-- ELSE --><select id="template_id" name="template_id">{S_TEMPLATE_OPTIONS}</select><!-- ENDIF --></dd> - </dl> - <dl> - <dt><label for="theme_id">{L_STYLE_THEME}:</label></dt> - <dd><!-- IF S_INSTALL --><strong id="theme_id">{THEME_NAME}</strong><!-- ELSE --><select id="theme_id" name="theme_id">{S_THEME_OPTIONS}</select><!-- ENDIF --></dd> - </dl> - <!-- ENDIF --> - <!-- IF S_STYLE --> - </fieldset> - - <fieldset> - <legend>{L_OPTIONS}</legend> - <dl> - <dt><label for="style_active">{L_STYLE_ACTIVE}:</label></dt> - <dd><label><input type="radio" class="radio" name="style_active" value="1"<!-- IF S_STYLE_ACTIVE --> id="style_active" checked="checked"<!-- ENDIF --> /> {L_YES}</label> - <label><input type="radio" class="radio" name="style_active" value="0"<!-- IF not S_STYLE_ACTIVE --> id="style_active" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd> - </dl> - <!-- IF not S_STYLE_DEFAULT --> - <dl> - <dt><label for="style_default">{L_STYLE_DEFAULT}:</label></dt> - <dd><label><input type="radio" class="radio" name="style_default" value="1" /> {L_YES}</label> - <label><input type="radio" class="radio" id="style_default" name="style_default" value="0" checked="checked" /> {L_NO}</label></dd> - </dl> - <!-- ENDIF --> - <!-- ENDIF --> +<!-- IF .extra_actions --> + <fieldset class="quick"> + <!-- BEGIN extra_actions --> + <input type="submit" name="{extra_actions.ACTION_NAME}" class="button2" value="{extra_actions.L_ACTION}" /> + <!-- END extra_actions --> </fieldset> +<!-- ENDIF --> - <fieldset class="submit-buttons"> - <legend>{L_SUBMIT}</legend> - <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> - {S_FORM_TOKEN} +<!-- IF .extra_links --> + <fieldset class="quick"> + <!-- BEGIN extra_links --> + <a class="button2" href="{extra_links.U_ACTION}">{extra_links.L_ACTION}</a> + <!-- END extra_links --> </fieldset> +<!-- ENDIF --> - </form> +</form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_words.html b/phpBB/adm/style/acp_words.html index 113f58ef92..4acd75f933 100644 --- a/phpBB/adm/style/acp_words.html +++ b/phpBB/adm/style/acp_words.html @@ -60,7 +60,7 @@ <!-- IF words.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> <td style="text-align: center;">{words.WORD}</td> <td style="text-align: center;">{words.REPLACEMENT}</td> - <td> <a href="{words.U_EDIT}">{ICON_EDIT}</a> <a href="{words.U_DELETE}">{ICON_DELETE}</a> </td> + <td> <a href="{words.U_EDIT}">{ICON_EDIT}</a> <a href="{words.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a> </td> </tr> <!-- BEGINELSE --> <tr class="row3"> diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index ceda824e5a..7afcc3d23b 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -101,6 +101,10 @@ hr { font-size: 0.85em; } +.hidden { + display: none; +} + /* General links */ a:link, a:visited { color: #105289; @@ -626,12 +630,29 @@ td.name { .col1 { background-color: #DCEBFE; } .col2 { background-color: #F9F9F9; } +/* 4 row background colours for trees */ +.row1a { background-color: #F9F9F9; } +.row1b { background-color: #F6F6F6; } +.row2a { background-color: #E7EEF4; } +.row2b { background-color: #E3EBF2; } + .spacer { background-color: #DBDFE2; height: 1px; line-height: 1px; } +/* Deactivated row */ +.row-inactive { + color: #999; +} +.row-inactive a, .row-inactive strong { + color: #888; +} +.row-inactive a:hover { + color: #BC2A4D; +} + /* General form styles ----------------------------------------*/ fieldset { @@ -1070,6 +1091,56 @@ input.disabled { color: #666666; } +/* jQuery popups +---------------------------------------- */ +.phpbb_alert { + background-color: #FFFFFF; + border: 1px solid #999999; + position: fixed; + display: none; + top: 100px; + left: 35%; + width: 30%; + z-index: 50; + padding: 25px; + padding: 0 25px 20px 25px; +} + +.phpbb_alert .alert_close { + display: block; + float: right; + width: 16px; + height: 16px; + overflow: hidden; + text-decoration: none !important; + background: transparent url("../images/alert_close.png") 0 0 no-repeat; + margin-top: -7px; + margin-right: -31px; +} +.phpbb_alert .alert_close:hover { + background-position: 0 -16px; +} + + +.phpbb_alert p { + margin: 8px 0; + padding-bottom: 8px; +} + +#darkenwrapper { + display: none; +} + +#darken { + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: #000000; + opacity: 0.5; +} + /* Pagination ---------------------------------------- */ .pagination { diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js new file mode 100644 index 0000000000..fd2f7a2122 --- /dev/null +++ b/phpBB/adm/style/ajax.js @@ -0,0 +1,135 @@ +(function($) { // Avoid conflicts with other libraries + +"use strict"; + +var img_templates = { + up: $('.template-up-img'), + up_disabled: $('.template-up-img-disabled'), + down: $('.template-down-img'), + down_disabled: $('.template-down-img-disabled') +}; + +/** + * The following callbacks are for reording forums in acp_forums. forum_down + * is triggered when a forum is moved down, and forum_up is triggered when + * a forum is moved up. It moves the row up or down, and deactivates / + * activates any up / down icons that require it (the ones at the top or bottom). + */ +phpbb.add_ajax_callback('forum_down', function() { + var el = $(this), + tr = el.parents('tr'); + + if (tr.is(':first-child')) + { + var up_img = img_templates.up.clone().attr('href', tr.attr('data-up')); + el.parents('span').siblings('.up').html(up_img); + + tr.next().find('.up').html(img_templates.up_disabled); + + phpbb.ajaxify({ + selector: el.parents('span').siblings('.up').children('a'), + callback: 'forum_up' + }); + } + + tr.insertAfter(tr.next()); + + if (tr.is(':last-child')) + { + el.replaceWith(img_templates.down_disabled); + + var down_img = img_templates.down.clone().attr('href', tr.attr('data-down')); + tr.prev().find('.down').html(down_img); + + phpbb.ajaxify({ + selector: tr.prev().find('.down').children('a'), + callback: 'forum_down' + }); + } +}); + +phpbb.add_ajax_callback('forum_up', function() { + var el = $(this), + tr = el.parents('tr'); + + if (tr.is(':last-child')) + { + var down_img = img_templates.down.clone().attr('href', tr.attr('data-down')); + el.parents('span').siblings('.down').html(down_img); + + tr.prev().find('.down').html(img_templates.down_disabled); + + phpbb.ajaxify({ + selector: el.parents('span').siblings('.down').children('a'), + callback: 'forum_down' + }); + } + + tr.insertBefore(tr.prev()); + + if (tr.is(':first-child')) + { + el.replaceWith(img_templates.up_disabled); + + var up_img = img_templates.up.clone().attr('href', tr.attr('data-up')); + tr.next().find('.up').html(up_img); + + phpbb.ajaxify({ + selector: tr.next().find('.up').children('a'), + callback: 'forum_up' + }); + } +}); + +/** + * This callback replaces activate links with deactivate links and vice versa. + * It does this by replacing the text, and replacing all instances of "activate" + * in the href with "deactivate", and vice versa. + */ +phpbb.add_ajax_callback('activate_deactivate', function(res) { + var el = $(this), + new_href = el.attr('href'); + + el.text(res.text); + + if (new_href.indexOf('deactivate') !== -1) + { + new_href = new_href.replace('deactivate', 'activate') + } + else + { + new_href = new_href.replace('activate', 'deactivate') + } + + el.attr('href', new_href); +}); + +/** + * The removes the parent row of the link or form that triggered the callback, + * and is good for stuff like the removal of forums. + */ +phpbb.add_ajax_callback('row_delete', function() { + $(this).parents('tr').remove(); +}); + + + +$('[data-ajax]').each(function() { + var $this = $(this), + ajax = $this.attr('data-ajax'), + fn; + + if (ajax !== 'false') + { + fn = (ajax !== 'true') ? ajax : null; + phpbb.ajaxify({ + selector: this, + refresh: $this.attr('data-refresh') !== undefined, + callback: fn + }); + } +}); + + + +})(jQuery); // Avoid conflicts with other libraries diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index f05e9c56c5..0d88c8bcc5 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -9,7 +9,7 @@ <div id="page-footer"> <!-- IF S_COPYRIGHT_HTML --> - Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group + {CREDIT_LINE} <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF --> <!-- ENDIF --> @@ -17,11 +17,30 @@ <!-- IF S_COPYRIGHT_HTML --><br /><!-- ENDIF --> {DEBUG_OUTPUT} <!-- ENDIF --> + + <div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}"> + <div id="darken"> </div> + <div class="jalert" id="loadingalert"><h3>{L_LOADING}</h3><p>{L_PLEASE_WAIT}</p></div> + </div> + + <div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}"> + <a href="#" class="alert_close"></a> + <h3 class="alert_title"></h3><p class="alert_text"></p> + </div> + <div id="phpbb_confirm" class="phpbb_alert"> + <a href="#" class="alert_close"></a> + <p class="alert_text"></p> + <input type="button" class="button1" value="{L_YES}" /> + <input type="button" class="button2" value="{L_NO}" /> + </div> </div> </div> <script type="text/javascript" src="{T_JQUERY_LINK}"></script> <!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js"></script> +<!-- INCLUDEJS ajax.js --> +{SCRIPTS} </body> </html> diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html index 0d697aec1d..b6d7ee2f5c 100644 --- a/phpBB/adm/style/simple_footer.html +++ b/phpBB/adm/style/simple_footer.html @@ -5,7 +5,7 @@ <div id="page-footer"> <!-- IF S_COPYRIGHT_HTML --> - <br />Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group + <br />{CREDIT_LINE} <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF --> <!-- ENDIF --> |