Reorganized default.settings.js, it now can hold menu settings and the basics of block visibility rules. Changed drupalgap.menus from an array to an object. Changed the drupalgap.settings.blocks[theme] from an array to an object. Started on the basics of the block visibility rules rendering decisions. Changed user_menu to user_menu_authenticated and added an additional system menu called user_menu_anonymous. Implemented drupalgap_menus_load which rounds up menus specified in drupalgap.settings.menus and adds them to drupalgap.menus, it then iterates over all of the drupalgap.menu_links and extracts any links with a menu_name specified, and attaches them to their corresponding menu in drupalgap.menus. Changed the way menu_block_view renders a menu block, it is now dynamic and just grabs the menu_links and then returns a themed item list.
Finished up block visibility settings for user roles. Added drupalgap_user_has_role().
Removed call to drupalgap_page_http_status_code, this needs to go away and instead fall back on the hook_menu access callback system, yet to be implemented. Added node/% to menu router system. Added a theme_jqm_item_list(). Added node_load(). Added a generic /node page which shows a list of recent content in a list as clickable items.
Added drupalgap_get_placeholders_from_html() which extracts placeholder names from an html string. Now we can grab placeholders from *.tpl.html files. Removed the drupalgap_page_http_status_code function. The drupalgap_render_page function is now pulling placeholder names from the current *.tpl.html file and rendering the placeholders with their appropriate html.
Added primary_local_tasks system menu, block view implementation, and added it to the default theme's sub_navigation region. Added drupalgap_get_current_path() function. Better organized menu_execute_active_handler with variable declarations and comment positioning. Adjusted menu_router_build to use module_implements instead of module_invoke_all when rounding up hook_menu items, that way each menu item can have the module name attached to it. Also adjusted menu_router_build to set a default menu item type of MENU_NORMAL_ITEM. Added drupalgap_menu_router_build_menu_item_relationships which is used by menu_router_build to determine parent, sibling, and child item paths for each menu item. Fixed theme_item_list to watch out for zero items. Added the 'view' and 'edit' local tasks to the node page.
Added drupalgap_place_args_in_path() function. Modified menu_router_build() to attach the router path to each menu item. Fixed local tasks link paths to replace wildcards with current arguments.
Adjusted drupalgap_get_form to pass along additional arguments to the form's call back function.
Added default settings for drupalgap.user.roles so the user has the anonymous role no matter what (i.e. if the device is offline). Implemented the offline page to run through the new hook_menu and themee system, awesome, another set of html and js files that can be removed from the pages and scripts directories. Made the theme() function aware of variables.markup so the markup can be rendered as is. Added the theme_button(). Set up theme() to set variables.attributes as an empty JSON object if there isn't any incoming attributes, that way theme_* implementations can more easily add default attributes. Fixed a bunch of theme_* default attribute assignments so they don't override any other incoming attributes.
Added drupalgap_menu_access() which checks to see if a user account has permission to access a given path, it is almost complete with custom access call backs and access arguments, not quite though, it is a little buggy. Added drupalgap_prepare_argument_entities() which attempts to replace page and access arguments that are entity ids with the entity object so the loaded entity will be passed along to the functions, it is buggy though, needs work. Adjusted menu_execute_active_handler() to use the drupalgap_prepare_argument_entities() call. Adjusted menu_router_build() to give each menu item a 'path' property equal to its own menu item link. Adjusted menu_block_view() to use drupalgap_menu_access() so any menu item links a user doesn't have access to, will not be placed in the menu, also set up proper visibility on local tasks, i.e. if only the default task is available to access, then it isn't rendered at all. Started on implementation of node_access(). Adjusted node_page_view() to accept a loaded node instead of a node id, hooray!
Added drupalgap.entity and drupalgap.entity_edit which will be replacing all of the drupalgap.[entity_type] and drupalgap.[entity_type]_edit properties. Fixed drupalgap_prepare_argument_entities() to replace the entity id with the loaded entity at the correct index in the page arguments. Adjusted drupalgap_entity_build_from_form_state() to use drupalgap.entity_edit and set up its success call back to use drupalgap_goto and send the user back to the entity's page view. Deprecated drupalgap_entity_get_edit_object() in favor of drupalgap.entity_edit. Added drupalgap_entity_get_core_fields() which will return core fields (e.g. title, nid, created, etc) for entities, that way forms can more easily build these default properties into elements, then added drupalgap_entity_add_core_fields_to_form() to accomplish the latter. Deprecated drupalgap_entity_load_into_form() since drupalgap_field_info_instances_add_to_form has been adjusted to accept the loaded entity as an argument so default values can now be filled in during the form rendering, instead of after the page is loaded. Removed the title and type form elements from the node_edit form since these are now covered by drupalgap_entity_add_core_fields_to_form().
We no longer will attach a router path to menu link items when they are built by menu_router_build(). Adjusted drupalgap_get_menu_link_router_path() to return the input path as the router path if a menu link exists with the exact path, if the path doesn't exist it then works backwards on the arguments replacing with wildcards while looking for a suitable router path, if all else fails, it just returns the input path. Adjusted drupalgap_entity_form_submit() to use drupalgap.entity for the drupalgap_goto() on the success callback. Removed the required attribute on the nid field for forms. Fixed drupalgap_field_info_instances_add_to_form() to watch out for empty entity fields. Adjusted _drupalgap_form_validate to fall back to the form element name if there is no element title present. Implemented the node_add_page() a bit more, it now shows a list of content types the user can create and sends them off to the node_edit form. Added a 'create content' button and a list of recent content to the node_page(). Adjusted drupalgap.services.node to use drupalgap.entity and drupalgap.entity_edit. Creating and editing nodes is possible again, it's a little buggy after creating/editing multiple nodes though at this point.
Removed the node, node_add, and node_edit html and js files because they have been replaced by hook_menu implementations! w00t
Removed the dashboard html and js because it too has been replaced by a hook_menu implementation.
Started on the quest to get rid of drupalgap.node, drupalgap.node_edit, drupalgap.comment, drupalgap.comment_edit, etc.
Updated the code to be relative to the www directory instead of the www/DrupalGap directory. My oh my, that feels much better.
Started implementing a dynamic service resource generation technique, that way all the duplicate code used to implement service resources can be consolidated down into minimal handy dandy code.
Brought back the loading of the normal services api, we'll address this improvement later, and when we do it will be purely javascript based so the library will be available for web apps, jQM, sencha, etc, anything JS. We're going to try to keep form states in drupalgap.form_states keyed by form id, this is incomplete at this point and forms are still buggy. Added drupalgap_item_list_populate() which will, given a css id and array of items, populate an html list with the items, and refresh it jQM style. Added drupalgap_jqm_page_events which returns an array list of jQM page events. Adjusted menu_execute_active_handler() first assemble the content, then try to attach any jQM page event handlers that are present on the menu link item as a markup element to be rendered later. Improved theme_item_list() accept a type, so it can now theme ul, ol, dl, etc, and it now will theme an empty list if no items are provided. Tried to improve the DrupalGap API error alert to show the url, not sure if it worked, need to verify later. Added language as a default entity field for nodes in drupalgap_entity_get_core_fields(). Added file id support to drupalgap_entity_get_primary_key(). Filled in the user_listing() page with an empty jqm item list that now gets populated on the page's pageshow event, cool. Removes the scripts/users.js and pages/user.html since they have been replaced by a hook_menu.
Converted the node listing page to use a pageshow async retrieval method. Moved around some functions in the user.js module and fixed the user login submit function to use the form and form state values that are now being passed to submit handlers, oh yeah.
Modified drupalgap_render_page to remove variables from the output object if they are rendered via tpl.html placeholder replacement. Added a few user core fields to drupalgap_entity_get_core_fields(). Touched up the user-profile.tpl.html with name, created and picture placeholders and corresponding page callback values.
Removed user.html and user.js old school page system, replaced it with hook_menu implementation.