diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-01-23 22:21:37 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-01-23 22:21:37 +0000 |
| commit | b21e7be11a0abe57790ec2a2fcca1874632fed8c (patch) | |
| tree | 63cca83318d4f80914b6b90bbd9063ff5dabc6ea /modules/gallery/views | |
| parent | e47505081f2c1017a68f763e1170b44fddd1e722 (diff) | |
| parent | abdeb21ccbb25aee564335dbbfca4a8afaf49384 (diff) | |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/views')
| -rw-r--r-- | modules/gallery/views/admin_identity.html.php | 59 | ||||
| -rw-r--r-- | modules/gallery/views/admin_identity_confirm.html.php | 10 | ||||
| -rw-r--r-- | modules/gallery/views/admin_modules.html.php | 43 | ||||
| -rw-r--r-- | modules/gallery/views/admin_modules_confirm.html.php | 22 | ||||
| -rw-r--r-- | modules/gallery/views/form_uploadify.html.php | 12 |
5 files changed, 73 insertions, 73 deletions
diff --git a/modules/gallery/views/admin_identity.html.php b/modules/gallery/views/admin_identity.html.php deleted file mode 100644 index 51eaa58a..00000000 --- a/modules/gallery/views/admin_identity.html.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<script type="text/javascript"> - $(document).ready(function() { - $("#g-modules form").submit(function() { - var eDialog = '<div id="g-dialog"></div>'; - var params = $(this).serialize(); - var url = $(this).attr("action"); - $("body").append(eDialog); - $.post($(this).attr("action"), $(this).serialize(), function(data, textStatus) { - $("#g-dialog").html(data); - $("#g-dialog").dialog({ - bgiframe: true, - title: <?= t("Confirm identity provider change")->for_js() ?>, - resizable: false, - height:180, - modal: true, - overlay: { - backgroundColor: '#000', - opacity: 0.5 - }, - buttons: { - "Continue": function() { - $("#g-dialog form").submit(); - }, - Cancel: function() { - $(this).dialog('destroy').remove(); - } - } - }); - }); - return false; - }); - }); - -</script> -<div id="g-modules"> - <h1> <?= t("Manage identity providers") ?> </h1> - <p> - <?= t("Choose a different user/group management provider.") ?> - </p> - - <form method="post" action="<?= url::site("admin/identity/confirm") ?>"> - <?= access::csrf_form_field() ?> - <table> - <tr> - <th> <?= t("Active") ?> </th> - <th> <?= t("Description") ?> </th> - </tr> - <? foreach ($available as $module_name => $description): ?> - <tr class="<?= text::alternate("g-odd", "g-even") ?>"> - <? $data = array("name" => "provider"); ?> - <td> <?= form::radio($data, $module_name, $module_name == $active) ?> </td> - <td> <?= t($description) ?> </td> - </tr> - <? endforeach ?> - </table> - <input type="submit" value="<?= t("Change")->for_html_attr() ?>" /> - </form> -</div> diff --git a/modules/gallery/views/admin_identity_confirm.html.php b/modules/gallery/views/admin_identity_confirm.html.php deleted file mode 100644 index 54aae9c8..00000000 --- a/modules/gallery/views/admin_identity_confirm.html.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<form method="post" action="<?= url::site("admin/identity/change") ?>"> - <?= access::csrf_form_field() ?> - <?= form::hidden("provider", $new_provider) ?> - - <p><span class="ui-icon ui-icon-alert" style="float: left; margin:0 7px 20px 0;"></span> - <?= t("Are you sure you want to change your Identity Provider? Continuing will delete all existing users.") ?> - </p> -</form> - diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index aebedf09..a021d969 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -1,12 +1,53 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <div class="g-block ui-helper-clearfix"> + <script type="text/javascript"> + $("#g-module-update-form").ready(function() { + $("#g-module-update-form").ajaxForm({ + dataType: "json", + success: function(data) { + if (data.reload) { + window.location.reload(); + } else { + $("body").append('<div id="g-dialog">' + data.dialog + '</div>'); + $("#g-dialog").dialog({ + bgiframe: true, + autoOpen: true, + autoResize: true, + modal: true, + resizable: false, + height: 400, + width: 500, + position: "center", + title: <?= t("Confirm Module Activation")->for_js() ?>, + buttons: { + <?= t("Continue")->for_js() ?>: function() { + $("form", this).submit(); + $(".ui-dialog-buttonpane button:contains(Continue)") + .attr("disabled", "disabled") + .addClass("ui-state-disabled"); + }, + <?= t("Cancel")->for_js() ?>: function() { + $(this).dialog("destroy").remove(); + } + } + }); + if (!data.allow_continue) { + $(".ui-dialog-buttonpane button:contains(Continue)") + .attr("disabled", "disabled") + .addClass("ui-state-disabled"); + } + } + } + }); + }); + </script> <h1> <?= t("Gallery Modules") ?> </h1> <p> <?= t("Power up your Gallery by adding more modules! Each module provides new cool features.") ?> </p> <div class="g-block-content"> - <form method="post" action="<?= url::site("admin/modules/save") ?>"> + <form id="g-module-update-form" method="post" action="<?= url::site("admin/modules/confirm") ?>"> <?= access::csrf_form_field() ?> <table> <tr> diff --git a/modules/gallery/views/admin_modules_confirm.html.php b/modules/gallery/views/admin_modules_confirm.html.php new file mode 100644 index 00000000..59592505 --- /dev/null +++ b/modules/gallery/views/admin_modules_confirm.html.php @@ -0,0 +1,22 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<div class="ui-helper-clearfix"> + <p> + <?= t("The following issue(s) have been identified:") ?> + </p> + + <div id="g-admin-modules-messages" class="g-block-content"> + <ul> + <? foreach (array("error" => "g-error", "warn" => "g-warning") as $type => $class): ?> + <? foreach ($messages[$type] as $message): ?> + <li class="<?= $class ?>" style="padding-bottom: 0"><?= $message ?></li> + <? endforeach ?> + <? endforeach ?> + </ul> + <form method="post" action="<?= url::site("admin/modules/save") ?>"> + <?= access::csrf_form_field() ?> + <? foreach ($modules as $module): ?> + <?= form::hidden($module, 1) ?> + <? endforeach ?> + </form> + </div> +</div> diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php index f3b9c883..b3b81ecb 100644 --- a/modules/gallery/views/form_uploadify.html.php +++ b/modules/gallery/views/form_uploadify.html.php @@ -2,17 +2,21 @@ <style> #g-add-photos-canvas object { height: 33px; - left: -60px; + left: -80px; position: relative; z-index: 100; } +#g-add-photos-canvas span { + height: 33px; + width: 150px; +} #g-add-photos-button { float: left; - left: 175px; + left: 155px; padding-bottom: .5em; padding-top: .5em; position: relative; - width: 110px; + width: 150px; z-index: 1; } </style> @@ -21,6 +25,8 @@ <script type="text/javascript"> $("#g-add-photos-canvas").ready(function () { $("#g-uploadify").uploadify({ + width: 150, + height: 33, uploader: "<?= url::file("lib/uploadify/uploadify.swf") ?>", script: "<?= url::site("simple_uploader/add_photo/{$album->id}") ?>", scriptData: <?= json_encode($script_data) ?>, |
