aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmybarangay/_colours.scss8
-rw-r--r--web/cobrands/fixmybarangay/base.scss34
-rw-r--r--web/cobrands/fixmybarangay/config.rb25
-rw-r--r--web/cobrands/fixmybarangay/images/ie_front_logo.gifbin0 -> 3473 bytes
-rw-r--r--web/cobrands/fixmybarangay/images/ie_logo.pngbin0 -> 3559 bytes
-rw-r--r--web/cobrands/fixmybarangay/images/sprite.pngbin0 -> 125210 bytes
-rw-r--r--web/cobrands/fixmybarangay/layout.scss42
-rw-r--r--web/cobrands/fixmybarangay/messages.js26
-rw-r--r--web/cobrands/fixmybarangay/test-texts.json17
-rw-r--r--web/cobrands/fixmystreet/_layout.scss4
-rwxr-xr-xweb/fixmystreet_app_cgi.cgi7
-rwxr-xr-xweb/fixmystreet_app_fastcgi.cgi6
-rw-r--r--web/js/map-OpenLayers.js43
13 files changed, 187 insertions, 25 deletions
diff --git a/web/cobrands/fixmybarangay/_colours.scss b/web/cobrands/fixmybarangay/_colours.scss
new file mode 100644
index 000000000..b8229dc59
--- /dev/null
+++ b/web/cobrands/fixmybarangay/_colours.scss
@@ -0,0 +1,8 @@
+/* COLOURS */
+
+$primary: #ffff99;
+$primary_b: #000000;
+$primary_text: #222222;
+
+$contrast1: #00BD08;
+$contrast2: #AA8D11;
diff --git a/web/cobrands/fixmybarangay/base.scss b/web/cobrands/fixmybarangay/base.scss
new file mode 100644
index 000000000..7a33be97e
--- /dev/null
+++ b/web/cobrands/fixmybarangay/base.scss
@@ -0,0 +1,34 @@
+@import "../fixmystreet/_h5bp";
+@import "./_colours";
+@import "../fixmystreet/_mixins";
+@import "compass";
+
+@import "../fixmystreet/_base";
+
+#site-logo{
+ width: 225px !important;
+ background: url('/cobrands/fixmybarangay/images/sprite.png') -3px -3px no-repeat;
+}
+.ie6 #site-logo {
+ background: url('/cobrands/fixmybarangay/images/ie_logo.gif') 0 -5px no-repeat;
+}
+
+body.frontpage {
+ #site-logo{
+ width: 370px !important;
+ }
+}
+
+.ie6 body.frontpage #site-logo {
+ background:url(/cobrands/fixmybarangay/images/ie_front_logo.gif) 0 0 no-repeat;
+}
+
+.yellow-btn,
+a.yellow-btn,
+button.yellow-btn,
+input.yellow-btn{
+ @include button-reset(#FFD000, #cc9000, #aa7000, #300, #FFD000, #cc9000, #aa7000, #300);
+ &:visited, &:hover {
+ color:#300;
+ }
+} \ No newline at end of file
diff --git a/web/cobrands/fixmybarangay/config.rb b/web/cobrands/fixmybarangay/config.rb
new file mode 100644
index 000000000..cab97b18f
--- /dev/null
+++ b/web/cobrands/fixmybarangay/config.rb
@@ -0,0 +1,25 @@
+# Require any additional compass plugins here.
+
+# Set this to the root of your project when deployed:
+http_path = "/"
+css_dir = ""
+sass_dir = ""
+images_dir = ""
+javascripts_dir = ""
+
+# You can select your preferred output style here (can be overridden via the command line):
+# output_style = :expanded or :nested or :compact or :compressed
+
+# To enable relative paths to assets via compass helper functions. Uncomment:
+# relative_assets = true
+
+# To disable debugging comments that display the original location of your selectors. Uncomment:
+# line_comments = false
+
+# If you prefer the indented syntax, you might want to regenerate this
+# project again passing --syntax sass, or you can uncomment this:
+# preferred_syntax = :sass
+# and then run:
+# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
+
+line_comments = false # by Compass.app
diff --git a/web/cobrands/fixmybarangay/images/ie_front_logo.gif b/web/cobrands/fixmybarangay/images/ie_front_logo.gif
new file mode 100644
index 000000000..2eeda87ef
--- /dev/null
+++ b/web/cobrands/fixmybarangay/images/ie_front_logo.gif
Binary files differ
diff --git a/web/cobrands/fixmybarangay/images/ie_logo.png b/web/cobrands/fixmybarangay/images/ie_logo.png
new file mode 100644
index 000000000..df73a7785
--- /dev/null
+++ b/web/cobrands/fixmybarangay/images/ie_logo.png
Binary files differ
diff --git a/web/cobrands/fixmybarangay/images/sprite.png b/web/cobrands/fixmybarangay/images/sprite.png
new file mode 100644
index 000000000..fad72a23a
--- /dev/null
+++ b/web/cobrands/fixmybarangay/images/sprite.png
Binary files differ
diff --git a/web/cobrands/fixmybarangay/layout.scss b/web/cobrands/fixmybarangay/layout.scss
new file mode 100644
index 000000000..63b329337
--- /dev/null
+++ b/web/cobrands/fixmybarangay/layout.scss
@@ -0,0 +1,42 @@
+@import "_colours";
+@import "../fixmystreet/_layout";
+
+body {
+ background: #1A1A1A;
+}
+
+#front-main {
+ color: $primary_text;
+ background: $primary;
+
+ #postcodeForm {
+ margin-left: 0;
+ margin-right: 0;
+ }
+
+}
+
+.nav-wrapper {
+ .nav-wrapper-2 {
+ border-top: solid 4px $primary;
+ @include border-image(none);
+ }
+}
+#main-nav {
+ ul {
+ &#mysoc-menu {
+ background:$primary;
+ }
+ }
+}
+
+#front-howto {
+ #front_stats {
+ border-top: 0.25em solid #000;
+ div {
+ big {
+ color: #000;
+ }
+ }
+ }
+}
diff --git a/web/cobrands/fixmybarangay/messages.js b/web/cobrands/fixmybarangay/messages.js
new file mode 100644
index 000000000..aebf35156
--- /dev/null
+++ b/web/cobrands/fixmybarangay/messages.js
@@ -0,0 +1,26 @@
+$(function(){
+
+ var mm = $('#message_manager');
+
+ $.getJSON('/cobrands/fixmybarangay/test-texts.json', function(data) {
+ var items = [];
+ $.each(data, function(k, v) {
+ var item = $('<input type="radio"/>').attr({
+ 'id': 'mm_text_' + v.id,
+ 'name': 'mm_text',
+ 'value': v.text
+ }).wrap('<p/>').parent().html();
+ var label = $('<label/>', {
+ 'class': 'inline',
+ 'for': 'mm_text_' + v.id
+ }).text(v.text).wrap('<p/>').parent().html();
+ item = '<li><p>' + item + ' ' + label + '</p></li>';
+ items.push(item);
+ });
+ mm.html(items.join(''));
+ mm.find('input').click(function(){
+ $('#form_detail').val( $('input[name=mm_text]:checked').val() );
+ });
+ });
+
+});
diff --git a/web/cobrands/fixmybarangay/test-texts.json b/web/cobrands/fixmybarangay/test-texts.json
new file mode 100644
index 000000000..7acde1e32
--- /dev/null
+++ b/web/cobrands/fixmybarangay/test-texts.json
@@ -0,0 +1,17 @@
+[
+ {
+ "id" : 1,
+ "number" : "032-9999999",
+ "text" : "Pothole on corner of G. De Vera and T. Padilla"
+ },
+ {
+ "id" : 2,
+ "number" : "032-1234567",
+ "text" : "Broken street light on Rahmann Street"
+ },
+ {
+ "id" : 3,
+ "number" : "+63 917 0000000",
+ "text" : "F. Manalo giant pothole"
+ }
+]
diff --git a/web/cobrands/fixmystreet/_layout.scss b/web/cobrands/fixmystreet/_layout.scss
index 56b2f41d5..0973e645d 100644
--- a/web/cobrands/fixmystreet/_layout.scss
+++ b/web/cobrands/fixmystreet/_layout.scss
@@ -732,7 +732,7 @@ textarea.form-error {
.no-js #report-a-problem-sidebar {
position: static;
width: auto;
- @include box-shadow(rgba(0, 0, 0, 0), 0, 0, 0);
+ @include box-shadow(rgba(0, 0, 0, 0) 0 0 0);
.sidebar-tips,
.sidebar-notes {
font-size:1em;
@@ -1012,7 +1012,7 @@ body.frontpage {
.general-sidebar-notes {
position: static;
width: auto;
- @include box-shadow(rgba(0, 0, 0, 0), 0, 0, 0);
+ @include box-shadow(rgba(0, 0, 0, 0) 0 0 0);
.sidebar-tips,
.sidebar-notes {
font-size:1em;
diff --git a/web/fixmystreet_app_cgi.cgi b/web/fixmystreet_app_cgi.cgi
index 7d60ce673..dd0984e15 100755
--- a/web/fixmystreet_app_cgi.cgi
+++ b/web/fixmystreet_app_cgi.cgi
@@ -1,8 +1,11 @@
#!/usr/bin/env perl
BEGIN { # set all the paths to the perl code
- use FindBin;
- require "$FindBin::Bin/../setenv.pl";
+ use File::Spec;
+ use File::Basename;
+ my $root = dirname(File::Spec->rel2abs(__FILE__));
+
+ require "$root/../setenv.pl";
}
use Catalyst::ScriptRunner;
diff --git a/web/fixmystreet_app_fastcgi.cgi b/web/fixmystreet_app_fastcgi.cgi
index 1059cbd34..08504f8f4 100755
--- a/web/fixmystreet_app_fastcgi.cgi
+++ b/web/fixmystreet_app_fastcgi.cgi
@@ -1,8 +1,10 @@
#!/usr/bin/env perl
BEGIN { # set all the paths to the perl code
- use FindBin;
- require "$FindBin::Bin/../setenv.pl";
+ use File::Spec;
+ use File::Basename;
+ my $root = dirname(File::Spec->rel2abs(__FILE__));
+ require "$root/../setenv.pl";
}
use Catalyst::ScriptRunner;
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index d98994d84..eca1fc074 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -70,26 +70,31 @@ function fms_markers_list(pins, transform) {
}
function fixmystreet_onload() {
- if ( fixmystreet.area ) {
- var area = new OpenLayers.Layer.Vector("KML", {
- strategies: [ new OpenLayers.Strategy.Fixed() ],
- protocol: new OpenLayers.Protocol.HTTP({
- url: "/mapit/area/" + fixmystreet.area + ".kml?simplify_tolerance=0.0001",
- format: new OpenLayers.Format.KML()
- })
- });
- fixmystreet.map.addLayer(area);
- area.events.register('loadend', null, function(a,b,c) {
- var bounds = area.getDataExtent();
- if (bounds) {
- var center = bounds.getCenterLonLat();
- var z = fixmystreet.map.getZoomForExtent(bounds);
- if ( z < 13 && $('html').hasClass('mobile') ) {
- z = 13;
- }
- fixmystreet.map.setCenter(center, z, false, true);
+<<<<<<< HEAD
+ if ( fixmystreet.area.length ) {
+ for (var i=0; i<fixmystreet.area.length; i++) {
+ var area = new OpenLayers.Layer.Vector("KML", {
+ strategies: [ new OpenLayers.Strategy.Fixed() ],
+ protocol: new OpenLayers.Protocol.HTTP({
+ url: "/mapit/area/" + fixmystreet.area[i] + ".kml?simplify_tolerance=0.0001",
+ format: new OpenLayers.Format.KML()
+ })
+ });
+ fixmystreet.map.addLayer(area);
+ if ( fixmystreet.area.length == 1 ) {
+ area.events.register('loadend', null, function(a,b,c) {
+ var bounds = area.getDataExtent();
+ if (bounds) {
+ var center = bounds.getCenterLonLat();
+ var z = fixmystreet.map.getZoomForExtent(bounds);
+ if ( z < 13 && $('html').hasClass('mobile') ) {
+ z = 13;
+ }
+ fixmystreet.map.setCenter(center, z, false, true);
+ }
+ });
}
- });
+ }
}
var pin_layer_style_map = new OpenLayers.StyleMap({