Skip to content
Snippets Groups Projects
Commit 0f5ffad2 authored by Sebastian Paul's avatar Sebastian Paul
Browse files

refactoring fixes

parent ca63aaa7
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,4 @@ name = Unity Webapp
description = "Ubuntu Unity Api Integration"
package = Administration
core = 7.x
scripts[] = unity_api.js
scripts[] = unity_webapp.js
......@@ -4,6 +4,7 @@ unityApiFuncGenerator = function (akey) {
}
};
function unityReady() {
var Unity = external.getUnityObject(1.0);
for (key = 0; key < Drupal.settings.unity_api.links.length; key++) {
var self = this;
var yourloc = "/" + Drupal.settings.unity_api.links[key].href;
......
......@@ -19,12 +19,10 @@ function unity_webapp_generate_links_array() {
* Insert Javascript into the page.
*/
function unity_webapp_page_alter(&$page) {
global $_domain;
dsm($_domain);
dsm(drupal_get_title());
$faviconurl = file_create_url(theme_get_setting('favicon_path', variable_get('theme_default')));
$my_settings = array(
'sitename' => drupal_get_title(),
'pagetitle' => drupal_get_title(),
'sitename' => variable_get('site_name'),
'links' => unity_webapp_generate_links_array(),
'favicon' => $faviconurl,
'baseurl' => "dev.d7",
......
......@@ -2,4 +2,4 @@ name = Unity Webapp Menu
description = "Add drupal menu links to ubuntu unity HUD"
package = Administration
core = 7.x
dependencies[] = unity_hud
dependencies[] = unity_webapp
......@@ -30,6 +30,6 @@ function unity_webapp_menu_walk($object) {
* array with links
*/
function unity_webapp_menu_unity_webapp_addlinks() {
$links = unity_hud_walk(menu_tree_all_data("management"));
$links = unity_webapp_menu_walk(menu_tree_all_data("management"));
return $links;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment