Albums CMS Design Principles: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
Line 23: Line 23:
</syntaxhighlight>
</syntaxhighlight>


== Listings ==
== JavaScript/JQuery ==


=== JavaScript/JQuery handlers ===
=== Album listings ===


<span style="color:red;">The JavaScript in this section is deprecated and needs to be updated.</span>
<span style="color:red;">The JavaScript in this section is deprecated and needs to be updated.</span>
Line 43: Line 43:
$('.update-cache').on('click', {my: 'local options'}, $.littled.updateCache);
$('.update-cache').on('click', {my: 'local options'}, $.littled.updateCache);
</syntaxhighlight>
</syntaxhighlight>
=== Album details ===
~~ TK ~~
=== Gallery listings ===
~~ TK ~~


== See Also ==
== See Also ==

Revision as of 17:23, 11 September 2014


AJAX

When adding a new album-based CMS section, the following files may need to be updated with the new content type:

/_classes/content/cache_class.php
/_classes/content/resort_class.php

Obviously if a file includes the cache_class then the new content type will be available to that file.

PHP Classes

Classes derived from album_class and album_xpost_class that don’t have the same columns as those tables should set the db_field property value for those fields to FALSE in their class constructors.

function __construct() {
	parent::__construct();
	/* any child class property initialization would go here */
	$this->layout->db_field = false;
}

JavaScript/JQuery

Album listings

The JavaScript in this section is deprecated and needs to be updated.

LITTLED.Gallery.bindAlbumListingsHandlers()


The routine above doesn’t handle content refreshes. The code below adds that, along with some filtering utilities. This can be rolled up into a routine available through the littled cms library.

LITTLED.init({ setSortables: LITTLED.Gallery.bindAlbumListingsHandlers });
LITTLED.Gallery.keywordAutocomplete();
LITTLED.setSortables();
$('.datepicker').datepicker();
$('.update-cache').on('click', {my: 'local options'}, $.littled.updateCache);

Album details

~~ TK ~~

Gallery listings

~~ TK ~~

See Also