195 Commits

Author SHA1 Message Date
Johan Cwiklinski
6746792bdf Drop short_tags 2018-05-19 17:01:37 +02:00
shadlaws
90528d9c83 #2065 - Fix problems with double-ajaxifying of dialogs.
Change all jQuery-ui widget _init() functions to _create() functions.
2013-05-07 18:46:43 +02:00
Bharat Mediratta
313f2abc0c Merge pull request #205 from shadlaws/fix_2053
#2053 - Change all .bind() to .on() for jQuery future-proofing.
2013-03-11 09:46:00 -07:00
shadlaws
2e94edab53 #2053 - Change all .bind() to .on() for jQuery future-proofing.
- on/off are preferred to bind/unbind, live/die, and delegate/undelegate in jQuery 1.7+
- they're likely on the road toward deprecation, so let's replace them now.
2013-03-11 17:16:20 +01:00
shadlaws
b43349f4de #2048 - Remove unneeded jquery.autocomplete.css/js inclusions.
- removed autocomplete.css/js calls in server_add, tag, and g2_import.
- revised xss_data.txt golden file (line number changes only).
2013-03-10 22:08:16 +01:00
shadlaws
62335da791 Follow-on from autocomplete updates.
(9345dde83e, d632ef3e50)
- gallery module: added loading-small.gif (so all themes have it by default)
- gallery module: added css for .ui-autocomplete-loading (copied from .g-loading-small in wind,
but without !important so other themes can override it)
- gallery module: updated upgrader.html.php to use new image (removes theme dependence)
- wind theme: removed outdated css for .ac_loading (not used in v3.0.5, either)
- server_add module: removed multiple argument from autocomplete (doesn't work well with it)
2013-02-26 13:07:00 +01:00
Bharat Mediratta
d632ef3e50 Fix up autocomplete for admin_server_add - found and fixed some bugs
in gallery_autocomplete when "multiple" isn't set.  Fixed some
harmless syntax issues that js2-mode helpfully pointed out.
2013-02-17 00:23:50 -05:00
Bharat Mediratta
9396342250 Drop the requirement to have the install() function set the module
version.  It's redundant.  Fixes #1985.
2013-01-31 19:55:53 -05:00
shadlaws
5fca371a61 #1945 - Extend legal_file helper functions.
- Added get_types_by_extension function, which is a merged version of get...types_by_extension functions (similar to get_extensions).
- Added optional extension argument to get...extensions functions similar to get...types_by_extension functions.
- Added unit tests.  Now, every legal_file function has one.
- Restructured helper file to include caches.
- Added array_unique to get...types (derived from get...types_by_extension, which can be many-to-one).
- Edited server_add, uploader, and item model to use new functionality.
2013-01-28 23:31:18 +01:00
Bharat Mediratta
49f6ce2d94 gallery.menalto.com -> galleryproject.org
codex.gallery2.org -> codex.galleryproject.org

Fixes #1957.
2013-01-22 18:39:24 -05:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
a9be0691d9 Create an ajax response framework that inserts <meta> tags to guard
against UTF-7, and create a $.gallery_autocomplete variant of jQuery's
autocomplete that expects the first line to be a <meta> tag and
discards it.  More complete fix for #1871.
2012-05-19 11:31:25 -07:00
Bharat Mediratta
74fa9422db Revert "Prevent server_add autocomplete from being interpreted as UTF-7. Fixes #1871."
This only fixes server_add, we need to fix it more systemically.

This reverts commit 88c0363344.
2012-05-19 11:31:25 -07:00
Bharat Mediratta
88c0363344 Prevent server_add autocomplete from being interpreted as UTF-7. Fixes #1871. 2012-05-16 12:26:51 -07:00
Bharat Mediratta
ca037dc955 Improve the way server add deals with wacky directory names. Fixes #1857. 2012-05-11 15:58:46 -07:00
Bharat Mediratta
1ea6210303 Use legal_file::get_extensions() and variants where appropriate. Fixes #1815. 2012-05-07 21:26:38 -07:00
Maxim Rubis
2475bcd60c Fixed Delete button 2012-03-26 21:19:36 -04:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
c07af35a19 Oops, fix broken codex urls. For #1698. 2011-04-23 14:53:39 -07:00
Bharat Mediratta
ba20d5a500 Oops, this is the rest of the modules and themes for #1696 and #1698. 2011-04-23 14:46:07 -07:00
Bharat Mediratta
3312009319 Revive server_add.js which I accidentally removed in 80af9f0f17
as part of #1686.
2011-04-23 08:07:58 -07:00
Bharat Mediratta
efa3466a75 Oops, forgot to remove the reference to admin.js. Follow-on for #1686. 2011-04-23 07:13:55 -07:00
Bharat Mediratta
80af9f0f17 Inline admin JS into admin_server_add.html.php. Fixes #1686. 2011-04-23 07:05:15 -07:00
Bharat Mediratta
9d8eef143d Fix an outdated reference to $entry->file which went away in v4 of the
module.  Fixes #1669.
2011-04-02 15:36:50 -07:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Joe7
6b4ccc56ce Fix: photos get added as albums in case only some photos are selected via server ad
Fixes #1619
2011-01-21 09:32:55 -08:00
Bharat Mediratta
029fa606be Fix a bug introduced in the refactor in
6544854863 for #1547.  By skipping the
staging dirs, we wind up scanning the entire filesystem because the
first model is blank so there's no leading path before the /*.
2011-01-20 23:42:36 -08:00
Bharat Mediratta
0126a0385d Fix a bug introduced in 65ff2470a5,
clearly I didn't test this enough.  Further fix for #1460.
2011-01-19 19:50:50 -08:00
Bharat Mediratta
ee13b934f4 Fix all the head() and admin_head() theme callbacks to return the
results of the $theme->css() and $theme->script() calls.  This handles
the case where combining scripts/css returns HTML instead of putting
it in the queue for combination.  Fixes #1611.
2011-01-15 13:14:43 -08:00
Bharat Mediratta
9dfb733ad7 New albums should take the sort order from their parent. Fixes #1599. 2011-01-10 19:24:38 -08:00
Bharat Mediratta
65ff2470a5 Use eeldivad's fallback code from http://gallery.menalto.com/node/96806#comment-358404
instead of relying solely on preg_quote.  Fixes #1460.
2011-01-09 22:36:20 -08:00
Bharat Mediratta
6544854863 Move the directory queue into the database as well, otherwise if you
have too many directories it blows out the task queue and the whole
thing falls over.  Fixes #1547.
2011-01-09 22:29:26 -08:00
Bharat Mediratta
b7ffb0501e Replace preg_quote with a more targeted regex to fix the problem where
directories get skipped.  Fixes #1460, I think.
2011-01-09 18:38:09 -08:00
Bharat Mediratta
dff1a53696 All modules should be named Xxx_Core for extensibility. Fixes #1458. 2010-10-25 21:05:31 -07:00
Bharat Mediratta
d5dbd1677f "Server Add" -> "Server add"
(Sentence capitalization)
2010-08-09 21:22:54 -07:00
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
ed0f93a965 Fix typo, thanks cajun100 for reporting! 2010-02-25 18:26:20 -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