From: Maxious Date: Sun, 16 Sep 2012 08:29:56 +0000 Subject: continues javascritps X-Git-Url: https://maxious.lambdacomplex.org/git/?p=disclosr.git&a=commitdiff&h=c79bbda37875a23f8390150b8258787f48f1dad3 --- continues javascritps Former-commit-id: 31e80cd42c85bb329a75fbfe6689bf866e14de9e --- --- a/.gitmodules +++ b/.gitmodules @@ -10,16 +10,19 @@ [submodule "lib/Requests"] path = lib/Requests url = https://github.com/rmccue/Requests.git -[submodule "javascripts/flotr2"] - path = javascripts/flotr2 +[submodule "js/flotr2"] + path = js/flotr2 url = https://github.com/HumbleSoftware/Flotr2.git [submodule "lib/phpquery"] path = lib/phpquery url = https://github.com/TobiaszCudnik/phpquery.git -[submodule "javascripts/sigma"] - path = javascripts/sigma +[submodule "js/sigma"] + path = js/sigma url = https://github.com/jacomyal/sigma.js.git -[submodule "javascripts/bubbletree"] - path = javascripts/bubbletree +[submodule "js/bubbletree"] + path = js/bubbletree url = https://github.com/okfn/bubbletree.git +[submodule "lib/querypath"] + path = lib/querypath + url = https://github.com/technosophos/querypath.git --- a/about.php +++ b/about.php @@ -8,7 +8,7 @@

What is this?

Disclo.gs is a project to monitor Australian Federal Government agencies -compliance with their "proactive disclosure requirements". +compliance with their "proactive disclosure requirements" to make a transparency league table as suggested by gov2 taskforce http://gov2.net.au/blog/2009/09/19/a-league-ladder-of-psi-openness/.

Attributions

National Archives of Australia, Australian Governments’ Interactive Functions Thesaurus, 2nd edition, September 2005, published at http://www.naa.gov.au/recordkeeping/thesaurus/index.htm. --- /dev/null +++ b/admin/agls.php @@ -1,1 +1,35 @@ + + namefunction"; +$db = $server->get_db('disclosr-agencies'); +try { + $agencies = $db->get_view("app", "byCanonicalName", null, true)->rows; + + + if ($agencies) { + foreach ($agencies as $row) { + + echo "" . $row->value->name . ""; + if (isset($row->value->metaTags)) { + if (is_array($row->value->metaTags)) { + $tags =$row->value->metaTags; + } else { + $tags = object_to_array($row->value->metaTags); + } + if (isset($tags['AGLS.Function'])) { + echo "" . $tags['AGLS.Function'] . ""; + } + } + echo ""; + } + } +} catch (SetteeRestClientException $e) { + setteErrorHandler($e); +} +include_footer(); +?> + --- a/admin/conflicts.php +++ b/admin/conflicts.php @@ -1,7 +1,7 @@ get_db('disclosr-agencies'); + +try { + $agencies = $db->get_view("app", "byCanonicalName", null, true)->rows; + //print_r($rows); + foreach ($agencies as $agency) { + //echo $agency->value->name . " ".$agency->value->website."
\n"; + // print_r($agency); + //hasRestricitiveLicence" hasRestrictiveLicense -> has Restrictive Licence + // "hasYoutube" -> Tube + // "comment" -> "comments" + if (!isset($agency->value->metaTags) && isset($agency->value->website)) { + echo $agency->value->name . " ".$agency->value->website."
\n"; + $agency->value->metaTags = Array(); + $request = Requests::get($agency->value->website); + $html = phpQuery::newDocumentHTML($request->body); + phpQuery::selectDocument($html); + foreach (pq('meta')->elements as $meta) { + $tagName = $meta->getAttribute('name');; + $content = $meta->getAttribute('content'); + if ($tagName != "") { +echo "$tagName == $content
\n"; + $agency->value->metaTags[$tagName] = $content; + } + } + //print_r($agency->value->metaTags); + $db->save($agency->value); + echo "
"; + flush(); + } + } +} catch (SetteeRestClientException $e) { + setteErrorHandler($e); +} +?> + --- /dev/null +++ b/admin/naa-agift-tree.php @@ -1,1 +1,2504 @@ + + + + Demo of the tree layout in D3.js + + + + + +
+
+ + + + + + + + + + --- a/bubbletree.php +++ b/bubbletree.php @@ -5,13 +5,13 @@ Minimal BubbleTree Demo - - - - - - - + + + + + + + - - + + + - + + - + --- a/javascripts/app.js +++ /dev/null @@ -1,95 +1,1 @@ -/* Foundation v2.1.4 http://foundation.zurb.com */ -$(document).ready(function () { - /* Use this js doc for all application specific JS */ - - /* TABS --------------------------------- */ - /* Remove if you don't need :) */ - - function activateTab($tab) { - var $activeTab = $tab.closest('dl').find('a.active'), - contentLocation = $tab.attr("href") + 'Tab'; - - //Make Tab Active - $activeTab.removeClass('active'); - $tab.addClass('active'); - - //Show Tab Content - $(contentLocation).closest('.tabs-content').children('li').hide(); - $(contentLocation).show(); - } - - $('dl.tabs').each(function () { - //Get all tabs - var tabs = $(this).children('dd').children('a'); - tabs.click(function (e) { - activateTab($(this)); - }); - }); - - if (window.location.hash) { - activateTab($('a[href="' + window.location.hash + '"]')); - } - - /* ALERT BOXES ------------ */ - $(".alert-box").delegate("a.close", "click", function(event) { - event.preventDefault(); - $(this).closest(".alert-box").fadeOut(function(event){ - $(this).remove(); - }); - }); - - - /* PLACEHOLDER FOR FORMS ------------- */ - /* Remove this and jquery.placeholder.min.js if you don't need :) */ - - //$('input, textarea').placeholder(); - - - - /* UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE6/7/8 SUPPORT AND ARE USING .block-grids */ -// $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'left'}); -// $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'left'}); -// $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'left'}); -// $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'left'}); - - - - /* DROPDOWN NAV ------------- */ - - var currentFoundationDropdown = null; - $('.nav-bar li a, .nav-bar li a:after').each(function() { - $(this).data('clicks', 0); - }); - $('.nav-bar li a, .nav-bar li a:after').live('click', function(e) { - e.preventDefault(); - if (currentFoundationDropdown !== $(this).index() || currentFoundationDropdown === null) { - $(this).data('clicks', 0); - currentFoundationDropdown = $(this).index(); - } - $(this).data('clicks', ($(this).data('clicks') + 1)); - var f = $(this).siblings('.flyout'); - if (!f.is(':visible') && $(this).parent('.has-flyout').length > 1) { - $('.nav-bar li .flyout').hide(); - f.show(); - } else if (($(this).data('clicks') > 1) || ($(this).parent('.has-flyout').length < 1)) { - window.location = $(this).attr('href'); - } - }); - $('.nav-bar').live('click', function(e) { - e.stopPropagation(); - if ($(e.target).parents().is('.flyout') || $(e.target).is('.flyout')) { - e.preventDefault(); - } - }); - // $('body').bind('touchend', function(e) { - // if (!$(e.target).parents().is('.nav-bar') || !$(e.target).is('.nav-bar')) { - // $('.nav-bar li .flyout').is(':visible').hide(); - // } - // }); - - /* DISABLED BUTTONS ------------- */ - /* Gives elements with a class of 'disabled' a return: false; */ - -}); - --- a/javascripts/bubbletree +++ /dev/null --- a/javascripts/flotr2 +++ /dev/null --- a/javascripts/foundation.js +++ /dev/null @@ -1,14 +1,1 @@ -/* Foundation v2.1.4 http://foundation.zurb.com */ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck