Skip to content

Commit

Permalink
Merge branch 'master' into talmdal_dev
Browse files Browse the repository at this point in the history
Conflicts:
	modules/organize/js/organize.js
  • Loading branch information
Tim Almdal committed Dec 27, 2009
2 parents bccb6fc + 55f9408 commit 0a48212
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
12 changes: 2 additions & 10 deletions modules/organize/js/organize.js
Expand Up @@ -162,16 +162,8 @@
},

set_handlers: function() {
$("#g-organize-microthumb-panel")
.selectable({
filter: ".g-organize-microthumb-grid-cell",
selected: function(event, ui) {
$(ui.selected).children(".g-organize-microthumb").addClass("ui-state-highlight");
},
unselected: function(event, ui) {
$(ui.unselected).children(".g-organize-microthumb").removeClass("ui-state-highlight");
}
})
$("#g-organize-microthumb-grid")
.selectable({filter: ".g-organize-microthumb-grid-cell"})
.droppable($.organize.content_droppable);
$(".g-organize-microthumb-grid-cell")
.draggable($.organize.micro_thumb_draggable)
Expand Down
20 changes: 9 additions & 11 deletions modules/slideshow/helpers/slideshow_event.php
Expand Up @@ -31,14 +31,12 @@ static function module_change($changes) {
}

static function album_menu($menu, $theme) {
$descendants_count = ORM::factory("item", $theme->item()->id)
->descendants_count(array(array("type", "=", "photo")));
if ($descendants_count > 1) {
if ($theme->item()->descendants_count(array(array("type", "=", "photo")))) {
$menu->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))
->url("javascript:PicLensLite.start(" .
"{maxScale:0,feedUrl:'" . self::_feed_url($theme) . "'})")
->url("javascript:cooliris.embed.show(" .
"{maxScale:0,feed:'" . self::_feed_url($theme) . "'})")
->css_id("g-slideshow-link"));
}
}
Expand All @@ -47,17 +45,17 @@ static function photo_menu($menu, $theme) {
$menu->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))
->url("javascript:PicLensLite.start(" .
"{maxScale:0,feedUrl:'" . self::_feed_url($theme) . "'})")
->url("javascript:cooliris.embed.show(" .
"{maxScale:0,feed:'" . self::_feed_url($theme) . "'})")
->css_id("g-slideshow-link"));
}

static function tag_menu($menu, $theme) {
$menu->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))
->url("javascript:PicLensLite.start(" .
"{maxScale:0,feedUrl:'" . self::_feed_url($theme) . "'})")
->url("javascript:cooliris.embed.show(" .
"{maxScale:0,feed:'" . self::_feed_url($theme) . "'})")
->css_id("g-slideshow-link"));
}

Expand All @@ -66,9 +64,9 @@ private static function _feed_url($theme) {
if (!$item->is_album()) {
$item = $item->parent();
}
return rss::url("gallery/album/{$item->id}?page_size=100");
return rss::url("gallery/album/{$item->id}");
} else {
return rss::url("tag/tag/{$theme->tag()->id}?page_size=100");
return rss::url("tag/tag/{$theme->tag()->id}");
}
}
}
2 changes: 1 addition & 1 deletion modules/slideshow/helpers/slideshow_theme.php
Expand Up @@ -20,7 +20,7 @@
class slideshow_theme_Core {
static function head($theme) {
$proto = (empty($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] === "off") ? "http" : "https";
return "<script src=\"$proto://lite.piclens.com/current/piclens_optimized.js\" " .
return "<script src=\"$proto://apps.cooliris.com/slideshow/go.js\" " .
"type=\"text/javascript\"></script>";
}
}

0 comments on commit 0a48212

Please sign in to comment.