Commit Graph

51 Commits

Author SHA1 Message Date
Andy Staudacher
ed0f93a965 Fix typo, thanks cajun100 for reporting! 2010-02-25 18:26:20 -08:00
Tim Almdal
7ea13b3869 Normalize capitalization ticket #596 2009-10-28 12:15:52 -07:00
Chad Kieffer
4241e03d75 Breadcrumb updates. Apply g-first and g-active consistently, use ems instead of px for nicer proportions, make font-size the same whether on the page or in a dialog. 2009-10-27 23:03:43 -06:00
Chad Kieffer
e3f90a889d Adjust order of items on server_add admin page. Restore autocomplete to the add form. Created a server_add.css file. 2009-10-23 22:24:06 -06:00
Chad Kieffer
5f56cbf997 Wrap all admin views in g-block and g-block content. This provides the means to visually separate the view's title and description from everything else. Primary admin view title should always be h1, and only one h1 per view. Removed some unused admin CSS id's. 2009-10-18 20:22:10 -06:00
Chad Kieffer
d581bbbd1e Renamed more CSS selectors from gName to g-name. 2009-10-04 15:53:00 -06:00
Chad Kieffer
3e6ba7acc3 Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. 2009-10-04 00:27:22 -06:00
Chad Kieffer
1f02c1ef6e Apply gModuleStatus to server add status message. 2009-09-30 22:48:05 -06:00
Tim Almdal
be84c7be25 * Changed the close functionality so the page is reloaded when the dialog is closed.
* Renamed the ServerAddCloseButton.
* Added Pause and Continue buttons. Now when add is clicked, A Pause button is shown,
  once the adding is complete, the add button is reshown andpause button is hidden.
  Clicking the pause button will hide it and show a continue button.
2009-09-18 12:17:58 -07:00
Tim Almdal
15c3f0b1aa Refactor the server add javascript into a ui.gallery_server_add widget. 2009-09-17 21:26:55 -07:00
Tim Almdal
6469763225 Reload the album when server_add dialog is closed 2009-09-17 11:10:15 -07:00
Andy Staudacher
2bf9b8ee55 Fix double -> single quotes (::js_string returns a double-quotes delimited string) 2009-08-30 23:11:13 -07:00
Andy Staudacher
bd52a85f98 (mostly harmless) XSS fix in server add 2009-08-30 21:34:55 -07:00
Andy Staudacher
b9bd1681a3 Update all code to use helper method html::clean(), html::purify(), ... instead of SafeString directly. 2009-08-29 22:54:20 -07:00
Andy Staudacher
0204617b60 XSS fixes 2009-08-29 15:41:02 -07:00
Andy Staudacher
a5dfc81a8f Merge commit 'upstream/master'
Conflicts:

	modules/akismet/views/admin_akismet.html.php
	modules/comment/helpers/comment_rss.php
	modules/gallery/helpers/gallery_rss.php
	modules/gallery/libraries/I18n.php
	modules/gallery/views/permissions_browse.html.php
	modules/gallery/views/simple_uploader.html.php
	modules/info/views/info_block.html.php
	modules/organize/controllers/organize.php
	modules/organize/views/organize.html.php
	modules/organize/views/organize_album.html.php
	themes/default/views/album.html.php
	themes/default/views/movie.html.php
	themes/default/views/photo.html.php
2009-08-29 14:17:48 -07:00
Andy Staudacher
c01ac42c46 Refactor all calls of p::clean() to SafeString::of() and p::purify() to SafeString::purify().
Removing any p::clean() calls for arguments to t() and t2() since their args are wrapped in a SafeString anyway.
2009-08-29 12:48:40 -07:00
Tim Almdal
afa8cade7f Fix for ticket #590. The gallery.dialog.js looks for an element "#dialog #gProgress" and if it finds it assumes that it is a progress dialog and removes the title. This pathc changes the name of the div containing the progress bar to gServerAddProgress and avoids the issue.
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-08-18 05:18:41 +08:00
Tim Almdal
a302a9c3fa Refactor the gallery dialog into a jQuery widget
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-08-08 02:08:28 +08:00
Tim Almdal
9f396178ce Revert "Allow a theme to override the page refresh mechanism. Create a new"
This reverts commit 1f014aae6c.
2009-08-05 09:24:27 -07:00
Tim Almdal
1f014aae6c Allow a theme to override the page refresh mechanism. Create a new
javascript lib (gallery.reload.js) which defines the functions
gallery_reload() and gallery_location(new_location).  They just
do a window.location.reload() and window.location = new_location.

This change breaks the assumption that all themes will handle page reloads
the same and allows the theme to customize the page refresh.
2009-07-27 12:39:12 -07:00
Bharat Mediratta
0bf69c63d8 Don't escape & in JS text; it triggers the "Disallowed key characters
in global data." check in the Input library.
2009-07-23 16:58:26 -07:00
Bharat Mediratta
050c82cf80 Escape bare & symbols so that we use valid entities. Fixes ticket #577. 2009-07-21 11:09:23 -07:00
Bharat Mediratta
cbd80b5ff9 Get rid of the form from server_add, we're not using it.
Turn the cancel link into a themed close button which triggers a page
reload.

Add some padding to the left of the tree.
2009-07-11 07:37:49 -07:00
Bharat Mediratta
171522bf23 Add a "close" button. 2009-07-11 07:23:31 -07:00
Bharat Mediratta
954ab5a505 Further simplify server_add (and bump it to version 3).
Now we don't have checkboxes, but instead we restrict you to selecting
directories and albums from only one level in the hierarchy.  This
makes it easier for us to make sure that we properly create the
hierarchy that you want and avoid confusion about what's going to wind
up where.

Modify Server_Add_File_Model to have a parent_id and item_id and then
modify them as we go so that we can build up a tree structure there
*before* we create any items.  This makes it much easier to figure out
where a new item is going to go and get rid of a bunch of probably
buggy code in the main task.
2009-07-11 05:03:36 -07:00
Bharat Mediratta
5cf267cc4c Fix a bug where we were not properly locating the parent album when
adding a new album or photo.

Simplify the data structure that we pass down to
server_add_tree.html.php so that we just pass a file list and let it
do whatever it wants with it.
2009-07-10 08:01:32 -07:00
Bharat Mediratta
fad6c4783e Add status output to make it clearer what's happening when you add files. 2009-07-09 10:46:27 -07:00
Bharat Mediratta
b0429797fc Use p::purify instead of p::clean 2009-07-09 10:00:16 -07:00
Bharat Mediratta
faabae5dae Rework server_add. It's smaller and leaner now, storing the list of
files out in a separate model for scalability.  Removed the "pause"
functionality.

- Server_Add_Controller extends Admin_Controller so that we don't have
  to check for admin every time.
- Task completion time now factors in the time it takes to walk the
  arbitrarily deep trees
- Moved checkbox management entirely into JS using jQuery
- Simplified the JS considerably
2009-07-07 21:20:24 -07:00
Bharat Mediratta
d4075a4657 Only enable the [add] button when boxes are checked. 2009-07-02 11:49:45 -07:00
Bharat Mediratta
e5b6193b26 Partial pass of server_add cleanup. It's broken at this stage since
I've redone the browsing code but I have not implemented the adding
code.

1) Rename index() to browse() since index is too generic.
2) Simplify the data that we pass to _dialog and _tree
3) Change _tree to return list items only, so that the outer dialog
   can be a <ul> for consistency.
4) Simplify the data structures so that we're not tracking checked vs.
   unchecked status in the PHP code, it's all done in jquery where we
   can do it with just a line or two of JS
5) use glob() which pretty much entirely replaces _get_children
2009-07-02 11:23:40 -07:00
Bharat Mediratta
495c76f729 Eliminate temporary variables by passing the $item into the view and
making API calls on the item.
2009-07-02 05:11:03 -07:00
Bharat Mediratta
d4e976cc53 Remove empty <script> block. 2009-07-02 05:06:17 -07:00
Chad Kieffer
200e17c884 Use gMessage for "no paths defined" status message. 2009-06-23 23:44:08 -06:00
Bharat Mediratta
7e5a363ffc Only request the server_add js if the user is an admin 2009-06-04 12:21:51 -07:00
Tim Almdal
e1ce3196f4 Rewrite the server_add to have the server format the selection when a branch is opened. Sub trees re only retrieved when the branch is opened. Changed the
start task processing to fill in any subtrees that are selected, but were never expanded on the client.  Added the loading icon.

Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-06-05 03:13:14 +08:00
Bharat Mediratta
9369ccab7f Run all variables that come from user-entered data through p::clean() 2009-05-31 01:02:51 -07:00
Tim Almdal
7bd44b22e2 1) Change the processing so the server_add start task can return done = 1
if there are no eligible files selected
2) Change the javascript to handle this condition and show a pop up
2009-04-23 21:42:34 +00:00
Tim Almdal
49042345f6 Provide a translation of the titleon the fatal error dialog pop-up 2009-04-09 19:32:12 +00:00
Bharat Mediratta
921f3a2eee Put csrf token into Admin_View and Theme_View by default, then use it
directly wherever possible instead of access::csrf_token().
2009-03-27 03:43:21 +00:00
Tim Almdal
00ffb24eb0 Add a pause button to the server add dialog and if it is clicked then
the upload is paused.  If the dialog is closed and the task is not
complete then a warning message is displayed on the album.
2009-03-24 17:41:20 +00:00
Bharat Mediratta
0f5ccc9aa3 Switch from using SimpleUploader to using swfUpload as our flash based
uploader.  This is modeled on
http://codex.gallery2.org/Gallery3:Upload_UX but is not yet complete.

Notes:
* Changed #gProgressBar to .gProgressBar to support multiple progress
  bars on the same page
* Added a bunch of CSS to the "needs a home" section in
  themes/default/css/screen.css
2009-03-17 05:20:37 +00:00
Bharat Mediratta
ccc867f629 Get rid of $hidden; it was never defined 2009-03-16 09:11:30 +00:00
Bharat Mediratta
784adf835e clean up style attr 2009-03-16 07:16:54 +00:00
Tim Almdal
5c82ce33a2 Refactor the server add module to make use of the task api (Ticket
#125).  Haven't quite figured out what to do with the errors in the
context. Maybe they should show on the mainenance screen?
2009-03-10 21:30:33 +00:00
Bharat Mediratta
64b02026ed Cleanups.
- Show the "Server Add needs configuration" message whenever
  there are no paths.

- Un-ajaxify the admin code to remove complexity and allow us to
  update the status message as appropriate.

- Rename server_add_admin.html.php to admin_server_add.html.php
  for consistency.

- Fix up form to properly display error messages

- Get rid of server_add_dir_list.html.php now that we're
  non-ajaxified.

- Change delete <span> to an <a> for non-ajax world.
2009-03-05 02:26:39 +00:00
Bharat Mediratta
ca2ddb0170 Minor cleanups. 2009-03-05 01:40:18 +00:00
Tim Almdal
c0e65b2029 move server_add styles into the theme screen.css files 2009-03-04 16:36:41 +00:00
Tim Almdal
fbc650bddb Changed $uid to $tree_id, so not to confuse anyone between and acroynm
for unique identifier as opposed to user id. :-)
2009-03-04 16:01:18 +00:00