From: Maxious Date: Sun, 16 Sep 2012 08:22:23 +0000 Subject: weird cloudflare "javascripts" folder bug X-Git-Url: https://maxious.lambdacomplex.org/git/?p=disclosr.git&a=commitdiff&h=4a9341add98bc6020c1148180ca4cb3b5cd25412 --- weird cloudflare "javascripts" folder bug Former-commit-id: 3d785d3b57c155abdae88cceec7ed322604372b1 --- --- 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/getAgency.php +++ b/getAgency.php @@ -6,18 +6,22 @@ function displayValue($key, $value, $mode) { global $db, $schemas; if ($mode == "view") { - +if (strpos($key, "_") === 0 || $key== "metadata") return; echo ""; echo "" . $schemas['agency']["properties"][$key]['x-title'] . "
" . $schemas['agency']["properties"][$key]['description'] . ""; if (is_array($value)) { echo "
    "; foreach ($value as $subkey => $subvalue) { - if (isset($schemas['agency']["properties"][$key]['x-property'])) { - echo '
  1. '; - } else { - echo "
  2. "; - } + + echo "
  3. "; + echo "$subvalue
  4. "; } echo "
"; @@ -28,8 +32,8 @@ echo ""; } if ((strpos($key, "URL") > 0 || $key == 'website') && $value != "") { - echo "view"; - } else { + echo "$value"; + } else { echo "$value"; } } @@ -61,7 +65,8 @@ } else { echo ""; if ((strpos($key, "URL") > 0 || $key == 'website') && $value != "") { - echo "view"; + echo "view"; + } if ($key == 'abn') { echo "view abn"; @@ -148,8 +153,8 @@ } if ($mode == "view") { - echo '
'; - echo '"; + echo '

' . $row['name'] . "

'; + echo '"; echo ""; } if ($mode == "edit") { @@ -202,10 +207,10 @@ echo '"; } catch (SetteeRestClientException $e) { --- 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 = $

' . $row['name'] . "

Field NameField Value