Bharat Mediratta
7607e1f932
Full pass over all the JSON encoding and JS dialog code. We now abide
...
by the following rules:
1) An initial dialog or panel load can take either HTML or JSON, but
the mime type must accurately reflect its payload.
2) dialog form submits can handle a pure HTML response, but the mime
type must also be correct. This properly resolves the problem
where the reauth code gets a JSON response first from the reauth
code, and then an HTML response when you reauth and continue on to
a given form -- try it out with Admin > Settings > Advanced.
3) All JSON replies must set the mime type correctly. The json::reply
convenience function does this for us.
4) By default, any HTML content sent back in the JSON response should be
in the "html" field, no longer the "form" field.
The combination of these allows us to stop doing boilerplate code like
this in our controllers:
// Print our view, JSON encoded
json::reply(array("form" => (string) $view));
instead, controllers can just return HTML, eg:
// Print our view
print $view;
That's much more intuitive for developers.
2010-07-31 21:16:17 -07:00
Tim Almdal
91a2c04a24
More patches as part of #1225 . Change the 'core' modules to use the json::reply
...
method to set the content type header and encode the response as a json object
2010-07-31 15:44:55 -07:00
Tim Almdal
329abfe539
Merge branch 'master' into talmdal_dev
2010-07-11 09:09:52 -07:00
Bharat Mediratta
fe8cb89ac4
Cast the status message to a string so that it gets sent down as a string in the json blob.
...
Fixes ticket #1198 .
2010-07-10 14:03:46 -07:00
Romain LE DISEZ
39962eaddc
Accept extension .m4v as video/mp4
2010-07-10 08:09:04 -07:00
Tim Almdal
dbf3199e46
Fix for ticket #1181 . Use $.getJSON to retrieve the json contents of the dialog. Convert all the controllers
...
that create the data to go into a dialog to return the html as part of a json object.
2010-07-06 14:12:01 -07:00
ckieffer
f1076590f1
Add page_title to admin views. Closes #1038 .
2010-04-30 00:08:37 -06:00
Bharat Mediratta
c82d24d475
preg_quote() the pattern we use for directory globs to avoid letting
...
the filename be treated as a regexp. Fixes #1086 .
2010-04-04 14:28:09 -07:00
Bharat Mediratta
c3c2b45280
Update the copyright to 2010. It's only 3 months into the year :-)
2010-03-03 10:15:34 -08:00
Andy Staudacher
f7b39e7db7
Fix server-add for German and other locales that use comma as decimal separator.
2010-02-22 12:31:46 -08:00
Bharat Mediratta
2253596379
Remove debug code.
2010-01-31 15:03:53 -08:00
Bharat Mediratta
56d04b1ed8
cast $task->done to bool so that it doesn't show up as "0" to the JS,
...
which will interpret that as a true value, when it's not.
2010-01-28 20:38:48 -08:00
Bharat Mediratta
4b32a71afc
Convert back to using ORM::factory(..., $id) instead of calling where().
2010-01-27 22:34:11 -08:00
Bharat Mediratta
7096c29124
Switch to model based validation.
2010-01-23 17:07:09 -08:00
Bharat Mediratta
5b84919d6e
First pass at converting server add to model based validation.
2010-01-24 14:21:57 -08:00
Tim Almdal
a11bf29507
Fix for ticket #972 and more. In Kohana 2.4, ORM::delete_all ignores any where
...
clauses and deletes all the entries in the table unless an array of id's are
passed as the parameter. This fix used the Database_builder to specify any where
conditions. Thanks psvo for find the first one. :-)
2010-01-09 23:57:16 -08:00
Tim Almdal
7af844606d
The problem occurs because the square brackets are treated as special characters in the glob to find the children. This patch escapes the square brackets. Fixes ticket #855
2009-12-30 15:33:22 -08:00
Bharat Mediratta
c50c2d135c
Fix uses of count_records() and use ORM to count instead.
2009-12-25 12:39:09 -08:00
Bharat Mediratta
8b9a02084a
Updates for the latest version of Kohana 2.4:
...
1) Controller::$input is gone -- use Input::instance() now
2) Handle new 'database.<default>.connection.params' parameter
3) Handle new 'cache.<default>.prefix' parameter
2009-12-21 21:27:43 -08:00
Bharat Mediratta
9af0a4e59c
Convert a database call.
2009-12-18 13:36:43 -08:00
Bharat Mediratta
94411b3658
Fix a bunch of places where we were using "= null" instead of "IS NULL".
2009-12-02 10:02:08 -08:00
Bharat Mediratta
1fd0e14359
Convert all DB where() calls to take 3 arguments.
...
Convert all open_paren() calls to and_open() or or_open() as appropriate.
2009-11-26 12:09:04 -08:00
Bharat Mediratta
0121bfd585
ORM::orderby -> ORM::order_by
2009-11-25 19:26:52 -08:00
Bharat Mediratta
2e420522ec
Preliminary work to cut over to Kohana 2.4
...
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
2009-11-25 13:22:24 -08:00
Tim Almdal
0a6b540092
Merge branch 'master' into talmdal_dev
...
Conflicts:
modules/server_add/helpers/server_add_theme.php
2009-10-24 07:28:22 -07: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
Tim Almdal
3c936d661a
Change the name of identity library from Identity to IdentityProvider. Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class
2009-10-22 13:11:03 -07:00
Tim Almdal
1b530e4680
Merge branch 'master' into talmdal_dev
...
Conflicts:
modules/user/views/admin_users.html.php
2009-10-19 06:27:18 -07:00
Chad Kieffer
c9ccc24618
Moved the short_form init function to gallery.common and made it jQuery plugin. Dropped gallery.form.js. Applied short forms to server_add and tag admin pages. Added tag.css to admin views. Added .g-wide {}.
2009-10-18 10:32:08 -06:00
Tim Almdal
78ee4193b7
Remove all non Identity API methods from Identity.php. Created an MY_Session class to provide the user state changes in the session and a login.php helper that has the login form.
2009-10-16 10:06:58 -07:00
Tim Almdal
00eacd659f
Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module.
2009-10-16 08:53:31 -07: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
Tim Almdal
c7f8d8be6f
Don't try to creat an album that corresponds to the staging directory. Just add the contents of the staging directlyinto the album that server_add was invoked from. Fixes ticket #785
2009-09-17 10:57:22 -07:00
Tim Almdal
a5af531fbe
Don't show links as part of the auto complete list
2009-09-17 07:04:11 -07:00
Bharat Mediratta
c3f8b62376
Adjust the text of the symlink error message.
2009-09-15 19:57:12 -07:00
Jan Koprowski
7cc37451f4
Forbid from add symbolink link in admin server add. Read ticket #744 for more details.
2009-09-15 19:55:16 -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
Bharat Mediratta
a28dd09c4e
Properly deal with invalid images. This fixes ticket #611 which shows
...
a BMP masquerading as a .jpg causing us to be unable to rebuild
resizes and thumbnails. Now if that happens, we discard the file, log
it and move on.
2009-08-27 17:04:48 -07:00
Bharat Mediratta
b9a6cd45ba
Skip empty files, since we know they're broken. Fixes ticket #610 .
2009-08-04 20:35:13 -07:00
Shai Ben-Naphtali
5a0424f458
Fix some consistency in text.
...
This fixes ticket #546
Signed-off-by: Bharat Mediratta <bharat@menalto.com >
2009-07-21 13:18:59 +08:00
Andy Staudacher
33d0b82d02
Fix l10n message inconsistency, ticket 546
2009-07-19 15:45:16 -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
b3785e1761
Remove debug code.
2009-07-10 08:04:37 -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
6fbb1e2daf
Avoid blowing the task data column by only adding directories to the queue instead of directories and files.
2009-07-09 14:03:07 -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
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
eb5538d135
Merge branch 'master' of git@github.com:/gallery/gallery3
...
Conflicts:
modules/server_add/controllers/admin_server_add.php
2009-07-02 18:00:22 -07:00