Commit Graph

56 Commits

Author SHA1 Message Date
Chad Kieffer
c377ffc2a5 Ticket #97. Applied button css where missing. Minor form css improvements. 2009-03-16 05:50:05 +00:00
Tim Almdal
c04ff8e02f Change the pattern to identify tables that need prefix substitution to
mirror the drupal pattern of using braces {}.
2009-02-28 06:37:28 +00:00
Tim Almdal
1328755b11 This implement table prefix for the watermark notification modules (Ticket #68) 2009-02-27 21:15:13 +00:00
Tim Almdal
9bba87ddc5 remove the extension and just use the IMAGETYPE_xxx constants 2009-02-24 01:24:11 +00:00
Tim Almdal
679b8c3971 Include jpg as valid graphic files 2009-02-23 14:45:09 +00:00
Bharat Mediratta
e83c2b3f8d Revert to using IMAGETYPE_XXX constants (at least for now) 2009-02-23 04:29:10 +00:00
Bharat Mediratta
2505bd1579 Hardcode extensions instead of using Image::$allowed_types because we
don't support TIFF files.  TIFF files are not viewable directly in
most browsers
2009-02-21 20:58:02 +00:00
Tim Almdal
af2f7f2c56 Use Image::$allowed_types instead of array(IMAGETYPE_GIF,
IMAGETYPE_JPEG, IMAGETYPE_PNG) as IMAGETYPE_GIF, IMAGETYPE_JPEG and
IMAGETYPE_PNG are not defined as constants
2009-02-20 19:04:58 +00:00
Tim Almdal
a8233ed979 Undo the adding underscores to the id on forge generated forms 2009-01-25 06:28:04 +00:00
Tim Almdal
cbff78daa8 Supply a form id on all forms. This id can be used by modules other
than the originating module to provide additional functionality to the form.
2009-01-24 17:26:47 +00:00
Andy Staudacher
e4a9b19bf9 Changing t() placeholder syntax from {{replace_me}} to %replace_me. 2009-01-15 10:02:41 +00:00
Bharat Mediratta
f3ba69c1d6 Make sure that helper functions are all static. Add new
File_Structure_Test to make sure we don't regress.

According to the PHP docs, the "public" keyword is implied on static
functions, so remove it.  Also, require private static functions to
start with an _.

http://php.net/manual/en/language.oop5.visibility.php
2009-01-14 04:12:02 +00:00
Bharat Mediratta
ae73ef3d57 Updated for new Form_Submit API.
OLD:
  $form->submit("Foo")  -->  <input type="submit" value="Foo">

New:
  $form->submit("foo_button")->("Foo") --> <input type="submit" name="foo_button" value="Foo">

Mostly we don't care what the button is so we leave the name blank.
2009-01-12 07:50:04 +00:00
Andy Staudacher
a631fe29f3 i18n refactoring: Rename all _() (reserved by gettext) calls to t().
- And refactor printf to our string interpolation / pluralization syntax
- Also, a slight change to the translations_incomings table, using binary(16) instead of char(32) as message key.
2009-01-08 17:13:06 +00:00
Bharat Mediratta
fa1ccbd86d Fix up all the various little forms to have submit buttons, fieldset legends, etc etc. 2009-01-06 09:22:29 +00:00
Chad Kieffer
fe16cd65ee Wrap div with another div instead of a paragraph 2009-01-04 18:37:13 +00:00
Bharat Mediratta
cd1d023754 Change the preamble for views in two ways:
1) drop unnecessary semicolon
2) start with <?php for extra security in the case that the server itself doesn't
   have short_tags enabled (the app won't work, but we need to make sure that we're
   still secure)
2009-01-01 00:23:29 +00:00
Bharat Mediratta
f29aad03a6 Make some columns smaller so that multi-column keys don't exceed 1024
bytes on some systems.
2008-12-30 01:37:09 +00:00
Bharat Mediratta
6ab195854d Remove rest::JSON content type; it's causing lots of problems and it doesn't directly help since text/html works just as well for our JSON communications 2008-12-29 22:41:53 +00:00
Bharat Mediratta
776123496b Add transparency support 2008-12-29 22:30:19 +00:00
Bharat Mediratta
8102d8ea77 Clean up _update_graphics_rules() to make it more robust 2008-12-29 20:17:24 +00:00
Felix Rabinovich
6b1fa62173 Added content type to JSON output functions 2008-12-26 20:08:15 +00:00
Bharat Mediratta
7fdde469d3 Move Watermarks under Content in the Site Admin menu. 2008-12-26 18:59:41 +00:00
Bharat Mediratta
ecf7d46a67 Add the graphics rules for both thumbs and resizes (instead of just thumbs). 2008-12-26 05:44:02 +00:00
Bharat Mediratta
dee20ed6a2 Added the concept of "permanent" messages that we show to admins. Use
this to show a "your thumbs/resizes are out of date" message whenever
we change the graphics rules.  Tweak watermark module to add graphics
rules whenever we make a change, which triggers the graphics module to
add the permanent message.
2008-12-26 05:43:06 +00:00
Bharat Mediratta
0630dc9a8e Fix get_add_form() to use self::positions() so that we get the right key/value pairs. 2008-12-26 05:14:00 +00:00
Bharat Mediratta
e31ca19a06 Added graphics::mark_all_dirty(). The watermark code now marks images
as dirty if the admin changes the watermark at all.
2008-12-26 04:52:18 +00:00
Bharat Mediratta
df3f0c3382 Add missing '=' causing <img> height not to get set. 2008-12-26 04:35:44 +00:00
Bharat Mediratta
837a5430b8 More watermark changes:
Change admin/watermarks/upload -> admin/watermarks/add for consistency.

Internationalize position text, store it as text in the database,
display it to the admin.

Make i18n strings consistent to reduce l10n load.
2008-12-26 04:34:20 +00:00
Bharat Mediratta
2011ee13ef Remove an HTTP redirect that was breaking the Ajax interface. 2008-12-26 04:02:55 +00:00
Bharat Mediratta
0fc14c1bfc Simplify the watermark module. We can now upload, edit and delete one
watermark.  The UI is rough and we don't yet apply the watermark to
images.. that's next.
2008-12-26 01:32:12 +00:00
Bharat Mediratta
2c91a7e9ce Rework log and message helpers to be parallel, but separate.
1) they now have their own matching severity constants
2) they both have convenience functions success(), info(), warning() and error()
3) they both have severity_class()
2008-12-25 23:43:44 +00:00
Bharat Mediratta
94e3ae2e0f Add edit/delete links (they're just stubs now, but they open a dialog).
Add active/position to Watermark_Model
2008-12-25 22:31:20 +00:00
Bharat Mediratta
75b9a7872c Remove extra uniquifying text that Forge adds to uploaded files. 2008-12-25 21:54:09 +00:00
Bharat Mediratta
526ac39697 Remove stray response:: (not yet time for this.. it's coming!) 2008-12-24 04:25:11 +00:00
Bharat Mediratta
c7193f9b2e Normalize our Admin controllers so that functions always print out
their results, as opposed to having them return their view back
upstream.  This is a little more code in every controller, but it's
much less magical and more consistent.

Look up the active_theme and active_admin_theme inside the view
itself, no need to do that in the controllers.  This makes view
initialization easier in the controllers.
2008-12-24 04:22:22 +00:00
Bharat Mediratta
2502240ce4 Add very simple graphics toolkits.
Track a set of rules in Graphics_Rule_Model which specify how we turn
original images into thumbnails and resizes.  There's one set of rules
that applies to every image in the Gallery.

Track the state of thumbs and resizes with a "dirty" bit.  The new
graphics helper manages the rules and can rebuild the thumbs and
resizes for any images that are considered "dirty".

Introduce the concept of an "album cover" which is an item that an
album points to.  We'll use that item as the source for the album's
thumbnail/resize.

Conflated with this change (sorry!) I also changed the Var table to
use module_name instead of module_id.  This may be marginally less
efficient, but it's much easier to follow in the database.
2008-12-23 04:14:07 +00:00
Bharat Mediratta
ddcf10dfce Allow the site admin to upload watermark images. Can't do much with them yet. 2008-12-23 01:29:17 +00:00
Bharat Mediratta
d330e4203a Step 1 of converting watermarks over to be an admin page. 2008-12-23 00:13:22 +00:00
Bharat Mediratta
34daf50695 Add attribute to <script> element. 2008-12-23 00:06:20 +00:00
Bharat Mediratta
c5173c5370 Remove stray comma. 2008-12-23 00:05:36 +00:00
Bharat Mediratta
fe27bd1eb3 Change the way that we track modules.
Each module now has a "module.info" file that has information about
the module, including the core.  We can display the installed version,
and the version in the code.

Also take a first shot at a modules admin page.
2008-12-22 03:41:33 +00:00
Bharat Mediratta
c67234974d Refactor site admin menu into a theme function and build the menus in
the various modules.  In the process, rename xxx_menu::site_navigation() to just
xxx_menu::site().  And add xxx_menu::admin().

The menus are the same as before, but I changed the HTML to be
consistent with the way that we do it in the regular site, and this
broke the superfish styles.  I don't know how to fix this.. help me
Chad!
2008-12-18 07:32:34 +00:00
Tim Almdal
f8a0c91ce6 Drag & Drop the watermark now works and so does the dropdown box. The target image is divided into a 3x3 quadrant referenced as: northwest, north, northeast, west, center, east, southeast, south, southwest. Similiar to the imagemagik garvities. Currently the watermark is placed in the left top of the particular quadrant. 2008-12-17 01:26:40 +00:00
Bharat Mediratta
59bb72df88 Fix preamble 2008-12-16 23:11:24 +00:00
Tim Almdal
b0c21915e9 Oops, remove the () on the parameter to $("#Dialog").ready(...) so we pass the function, not the results of the function call. 2008-12-16 19:16:34 +00:00
Tim Almdal
c32988a097 Separate the handling of the dialog resizing into the watermark.js, so we don't have to download the watermark dialog initialization with each request. 2008-12-16 19:12:24 +00:00
Tim Almdal
59bc7dc22c 1) change the selector for the the function to gDialog
2) Once the dialog is resized, center it
2008-12-16 19:06:03 +00:00
Tim Almdal
04441e11cc 1) Remove the load watermark from the scaffolding... use the menu option
2) The set watermark dialog is now sizing properly.  @todo is recenter in the window
2008-12-16 17:30:18 +00:00
Tim Almdal
92e6ed8a8a Start of the dialog to specify the watermark placement. For convience, using the imagemagik nomicalture regarding watermark locations (east, west, center, etc.)
You can drag the watermark around but it doesn't stay in place.
Need to figure out how to resize the dialog box

and all of the supporting javascript
2008-12-15 23:08:18 +00:00