diff options
Diffstat (limited to 'modules/gallery/views')
| -rw-r--r-- | modules/gallery/views/admin_maintenance_task.html.php | 5 | ||||
| -rw-r--r-- | modules/gallery/views/l10n_client.html.php | 7 | ||||
| -rw-r--r-- | modules/gallery/views/quick_pane.html.php | 103 | ||||
| -rw-r--r-- | modules/gallery/views/simple_uploader.html.php | 2 | ||||
| -rw-r--r-- | modules/gallery/views/upgrader.html.php | 108 |
5 files changed, 33 insertions, 192 deletions
diff --git a/modules/gallery/views/admin_maintenance_task.html.php b/modules/gallery/views/admin_maintenance_task.html.php index 1ee02311..d9aecc60 100644 --- a/modules/gallery/views/admin_maintenance_task.html.php +++ b/modules/gallery/views/admin_maintenance_task.html.php @@ -23,8 +23,11 @@ } </script> <div id="gProgress"> + <h1> <?= $task->name ?> </h1> <div class="gProgressBar"></div> - <div id="gStatus"></div> + <div id="gStatus"> + <?= t("Starting up...") ?> + </div> <div> <button id="gPauseButton" class="ui-state-default ui-corner-all" onclick="dismiss()"><?= t("Pause") ?></button> <button id="gDoneButton" class="ui-state-default ui-corner-all" style="display: none" onclick="dismiss()"><?= t("Done") ?></button> diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php index 2e53f48f..c15f4b0e 100644 --- a/modules/gallery/views/l10n_client.html.php +++ b/modules/gallery/views/l10n_client.html.php @@ -2,7 +2,11 @@ <div id="l10n-client" class="hidden"> <div class="labels"> <span class="toggle"><?= t("Translate Text") ?></span> - <div class="label strings"><h2><?= t("Page Text") ?></h2></div> + <div class="label strings"><h2><?= t("Page Text") ?> + <? if (!Input::instance()->get('show_all_l10n_messages')): ?> + <a style="background-color:#fff" href="<?= url::site("admin/languages?show_all_l10n_messages=1") ?>"><?= t("(Show All)") ?></a> + <? endif; ?> + </h2></div> <div class="label source"><h2><?= t("Source") ?></div> <div class="label translation"><h2><?= t("Translation to %language", array("language" => locale::display_name())) ?></h2></div> @@ -26,6 +30,7 @@ <div id="l10n-client-string-editor"> <div class="source"> <p class="source-text"></p> + <p id="source-text-tmp-space" style="display:none"></p> </div> <div class="translation"> <form method="post" action="<?= url::site("l10n_client/save") ?>" id="gL10nClientSaveForm"> diff --git a/modules/gallery/views/quick_pane.html.php b/modules/gallery/views/quick_pane.html.php index f50e1abe..eabf4a67 100644 --- a/modules/gallery/views/quick_pane.html.php +++ b/modules/gallery/views/quick_pane.html.php @@ -1,85 +1,14 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<? if ($item->type == "photo"): ?> -<? $title = t("Edit this photo") ?> -<? elseif ($item->type == "movie"): ?> -<? $title = t("Edit this movie") ?> -<? elseif ($item->type == "album"): ?> -<? $title = t("Edit this album") ?> -<? endif ?> -<a class="gDialogLink gButtonLink ui-corner-all ui-state-default" href="<?= url::site("quick/form_edit/$item->id?page_type=$page_type") ?>" - title="<?= $title ?>"> - <span class="ui-icon ui-icon-pencil"> - <?= $title ?> - </span> -</a> - -<? if ($item->is_photo() && graphics::can("rotate")): ?> -<a class="gButtonLink ui-corner-all ui-state-default" href="<?= url::site("quick/rotate/$item->id/ccw?csrf=$csrf&page_type=$page_type") ?>" - title="<?= t("Rotate 90 degrees counter clockwise") ?>"> - <span class="ui-icon ui-icon-rotate-ccw"> - <?= t("Rotate 90 degrees counter clockwise") ?> - </span> -</a> - -<a class="gButtonLink ui-corner-all ui-state-default" href="<?= url::site("quick/rotate/$item->id/cw?csrf=$csrf&page_type=$page_type") ?>" - title="<?= t("Rotate 90 degrees clockwise") ?>"> - <span class="ui-icon ui-icon-rotate-cw"> - <?= t("Rotate 90 degrees clockwise") ?> +<? foreach ($button_list->main as $button): ?> +<a class="<?= $button->class ?> ui-corner-all ui-state-default" href="<?= $button->href ?>" + title="<?= $button->title ?>"> + <span class="ui-icon <?= $button->icon ?>"> + <?= $button->title ?> </span> </a> -<? endif ?> +<? endforeach ?> -<? // Don't move photos from the photo page; we don't yet have a good way of redirecting after move ?> -<? if ($page_type == "album"): ?> -<? if ($item->type == "photo"): ?> -<? $title = t("Move this photo to another album") ?> -<? elseif ($item->type == "movie"): ?> -<? $title = t("Move this movie to another album") ?> -<? elseif ($item->type == "album"): ?> -<? $title = t("Move this album to another album") ?> -<? endif ?> -<a class="gDialogLink gButtonLink ui-corner-all ui-state-default" href="<?= url::site("move/browse/$item->id") ?>" - title="<?= $title ?>"> - <span class="ui-icon ui-icon-folder-open"> - <?= $title ?> - </span> -</a> -<? endif ?> - -<? $disabledState = "" ?> -<? if (access::can("edit", $item->parent())): ?> -<? if ($item->type == "photo"): ?> -<? $title = t("Choose this photo as the album cover") ?> -<? elseif ($item->type == "movie"): ?> -<? $title = t("Choose this movie as the album cover") ?> -<? elseif ($item->type == "album"): ?> -<? if (empty($item->album_cover_item_id)): ?> -<? $disabledState = empty($item->album_cover_item_id) ? " ui-state-disabled" : "" ?> -<? endif ?> -<? $title = t("Choose this album as the album cover") ?> -<? endif ?> -<a class="gButtonLink ui-corner-all ui-state-default<?= $disabledState ?>" href="<?= url::site("quick/make_album_cover/$item->id?csrf=$csrf&page_type=$page_type") ?>" - title="<?= $title ?>"> - <span class="ui-icon ui-icon-star"> - <?= $title ?> - </span> -</a> - -<? if ($item->type == "photo"): ?> -<? $title = t("Delete this photo") ?> -<? elseif ($item->type == "movie"): ?> -<? $title = t("Delete this movie") ?> -<? elseif ($item->type == "album"): ?> -<? $title = t("Delete this album") ?> -<? endif ?> -<a class="gDialogLink gButtonLink ui-corner-all ui-state-default" href="<?= url::site("quick/form_delete/$item->id?page_type=$page_type") ?>" id="gQuickDelete" title="<?= $title ?>"> - <span class="ui-icon ui-icon-trash"> - <?= $title ?> - </span> -</a> -<? endif ?> - -<? if ($item->is_album()): ?> +<? if (!empty($button_list->additional)): ?> <a class="gButtonLink ui-corner-all ui-state-default options" href="#" title="<?= t("additional options") ?>"> <span class="ui-icon ui-icon-triangle-1-s"> <?= t("Additional options") ?> @@ -87,19 +16,11 @@ </a> <ul id="gQuickPaneOptions" style="display: none"> - <li><a class="add_item gDialogLink" href="<?= url::site("simple_uploader/app/$item->id") ?>" - title="<?= t("Add a photo") ?>"> - <?= t("Add a photo") ?> - </a></li> - - <li><a class="add_album gDialogLink" href="<?= url::site("form/add/albums/$item->id?type=album") ?>" - title="<?= t("Add an album") ?>"> - <?= t("Add an album") ?> - </a></li> - - <li><a class="permissions gDialogLink" href="<?= url::site("permissions/browse/$item->id") ?>" - title="<?= t("Edit permissions") ?>"> - <?= t("Edit permissions") ?> + <? foreach ($button_list->additional as $button): ?> + <li><a class="<?= $button->class ?>" href="<?= $button->href ?>" + title="<?= $button->title ?>"> + <?= $button->title ?> </a></li> + <? endforeach ?> </ul> <? endif ?> diff --git a/modules/gallery/views/simple_uploader.html.php b/modules/gallery/views/simple_uploader.html.php index 55b4f458..eee29679 100644 --- a/modules/gallery/views/simple_uploader.html.php +++ b/modules/gallery/views/simple_uploader.html.php @@ -1,6 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <script type="text/javascript" src="<?= url::file("lib/swfupload/swfupload.js") ?>"></script> <script type="text/javascript" src="<?= url::file("lib/swfupload/swfupload.queue.js") ?>"></script> +<script type="text/javascript" src="<?= url::file("lib/jquery.scrollTo.js") ?>"></script> <!-- hack to set the title for the dialog --> <form id="gAddPhotosForm" action="<?= url::site("simple_uploader/finish?csrf=$csrf") ?>"> @@ -195,6 +196,7 @@ var fp = new File_Progress(file); fp.title.html(file.name); fp.set_status("uploading", "<?= t("Uploading...") ?>"); + $("#gAddPhotosCanvas").scrollTo(fp.box, 1000); return true; // @todo add cancel button to call this.cancelUpload(file.id) } diff --git a/modules/gallery/views/upgrader.html.php b/modules/gallery/views/upgrader.html.php index fa21e196..07792322 100644 --- a/modules/gallery/views/upgrader.html.php +++ b/modules/gallery/views/upgrader.html.php @@ -2,106 +2,10 @@ <html> <head> <title><?= t("Gallery3 Upgrader") ?></title> + <link rel="stylesheet" type="text/css" href="<?= url::file("modules/gallery/css/upgrader.css") ?>" + media="screen,print,projection" /> + <script src="<?= url::file("lib/jquery.js") ?>" type="text/javascript"></script> </head> - <style> - body { - background: #eee; - font-family: Trebuchet MS; - font-size: 1.1em; - } - h1 { - font-size: 1.4em; - } - div#outer { - width: 650px; - background: white; - border: 1px solid #999; - margin: 0 auto; - padding: -10px; - } - div#inner { - padding: 0 1em 0 1em; - margin: 0px; - } - div#footer { - border-top: 1px solid #ccc; - margin: 1em; - } - td.name { - text-align: left; - padding-left: 30px; - } - td { - text-align: center; - border-bottom: 1px solid #eee; - } - tr.current td { - color: #999; - font-style: italic; - } - tr.current td.gallery { - color: #00d; - } - tr.upgradeable td { - font-weight: bold; - } - tr.upgradeable td.gallery { - color: #00d; - } - table { - width: 600px; - margin-bottom: 10px; - } - p { - font-size: .9em; - } - ul { - font-size: .9em; - list-style: none; - } - li { - display: inline; - } - li:before { - content: "\00BB \0020"; - } - div.button { - margin: 0 auto; - width: 120px; - text-align: center; - border: 1px solid #999; - background: #eee; - } - div.button a { - text-decoration: none; - } - div.button:hover { - background: #ccc; - } - div#confirmation { - position: fixed; - top: 400px; - left: 325px; - background: blue; - z-index: 1000; - margin: 10px; - text-align: center; - } - div#confirmation div { - margin: 2px; - padding: 20px; - border: 2px solid #999; - background: white; - } - .gray_on_done { - opacity: <?= $done ? "0.5" : "1" ?>; - } - pre { - display: inline; - margin: 0px; - padding: 0px; - } - </style> <body> <div id="outer"> <img src="<?= url::file("modules/gallery/images/gallery.png") ?>" /> @@ -117,6 +21,12 @@ </p> </div> </div> + <script type="text/javascript"> + $(document).ready(function() { + $("#confirmation").css("left", Math.round(($(window).width() - $("#confirmation").width()) / 2)); + $("#confirmation").css("top", Math.round(($(window).height() - $("#confirmation").height()) / 2)); + }); + </script> <? endif ?> <p class="gray_on_done"> <?= t("Welcome to the Gallery upgrader. One click and you're done!") ?> |
