コード例 #1
0
ファイル: Cards.class.php プロジェクト: shawnlawyer/framework
 public static function my()
 {
     $_o = (object) null;
     $_o->size = 'fullscreen';
     $_o->head = 'My Packages';
     $_o->icon_type = 'menu-icon';
     $_o->icon_background = 'atom-icon-background';
     $_o->menu = (object) null;
     $_o->menu->items = array();
     $dom_id = FormInputComponent::uniqueHash('', '');
     $_o->menu->items[] = array('css_classes' => 'automagic-card-menu-item noSelect', 'id' => $dom_id, 'contents' => 'New Package', 'js_action' => DOMElementKitJS::onTapEventsXHRCall($dom_id, DOMElementKitJS::xhrCallObject('operations/package/newPackage')));
     $_o->body = array();
     $_o->body[] = CardKit::collectionCard((object) array('collection' => 'packages', 'icon' => 'atom', 'card_route' => 'cards/package/my', 'details_route' => 'cards/package/details'));
     return $_o;
 }
コード例 #2
0
ファイル: Cards.class.php プロジェクト: shawnlawyer/framework
 public static function favorites()
 {
     $_o = (object) null;
     $_o->size = 'fullscreen';
     $_o->icon_type = 'menu-icon';
     $_o->icon_background = 'sequode-icon-background';
     $_o->menu = (object) null;
     $_o->menu->items = array();
     $_o->head = 'Sequode Favorites';
     $dom_id = FormInputComponent::uniqueHash('', '');
     $_o->menu->items[] = array('css_classes' => 'automagic-card-menu-item noSelect', 'id' => $dom_id, 'contents' => 'Empty Favorites', 'js_action' => DOMElementKitJS::onTapEventsXHRCall($dom_id, DOMElementKitJS::xhrCallObject('operations/user/emptySequodeFavorites', [], 'function(){registry.fetch({collection:\'sequode_favorites\'});}')));
     $_o->body = array();
     $_o->body[] = CardKit::collectionCard((object) array('collection' => 'sequode_favorites', 'icon' => 'sequode', 'card_route' => 'cards/sequode/favorites', 'details_route' => 'cards/sequode/details'));
     return $_o;
 }
コード例 #3
0
 public static function onTapEventsXHRCallButton($contents, $route, $inputs = null, $callback = null)
 {
     $dom_id = FormInputComponent::uniqueHash('', '');
     $html = $js = array();
     $html[] = '<span class="btn" id="' . $dom_id . '">' . $contents . '</span>';
     $js[] = DOMElementKitJS::onTapEventsXHRCall($dom_id, DOMElementKitJS::xhrCallObject($route, $inputs, $callback));
     return (object) array('html' => implode('', $html), 'js' => implode('', $js));
 }