Skip to content
This repository has been archived by the owner on Apr 12, 2018. It is now read-only.

Commit

Permalink
W.I.P.
Browse files Browse the repository at this point in the history
Signed-off-by: kosmas58 <kosmas.schuetz@gmx.com>
  • Loading branch information
kosmas58 committed Aug 28, 2011
1 parent 2def32f commit 76c1d24
Show file tree
Hide file tree
Showing 44 changed files with 2,403 additions and 1,331 deletions.
2 changes: 2 additions & 0 deletions app/controllers/ui/widgets/selectmenu_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
class Ui::Widgets::SelectmenuController < ApplicationController
protect_from_forgery

layout 'application' , :except => [ :get_data ]
end
17 changes: 14 additions & 3 deletions app/stylesheets/jquery/ui/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -759,14 +759,21 @@ button.ui-button::-moz-focus-inner {
.ui-selectmenu-menu {
padding: 0;
margin: 0;
list-style: none;
position: absolute;
top: 0;
display: none;
overflow: auto;
z-index: 1005; }

/* z-index: 1005 to make selectmenu work with dialog */
.ui-selectmenu-menu ul {
padding: 0;
margin: 0;
list-style: none;
position: relative;
overflow: auto;
overflow-y: auto;
overflow-x: hidden; }

.ui-selectmenu-open {
display: block; }

Expand All @@ -792,7 +799,7 @@ button.ui-button::-moz-focus-inner {
outline: none;
text-decoration: none; }

.ui-selectmenu-menu li.ui-state-disabled a {
.ui-selectmenu-menu li.ui-state-disabled a, .ui-state-disabled {
cursor: default; }

.ui-selectmenu-menu li.ui-selectmenu-hasIcon a,
Expand Down Expand Up @@ -849,6 +856,10 @@ button.ui-button::-moz-focus-inner {
* html .ui-selectmenu-menu li a {
position: relative; }

/* IE7 workaround (opacity disabled) */
*+html .ui-state-disabled, *+html .ui-state-disabled a {
color: silver; }


/*
* jQuery UI Slider 1.8.16
Expand Down
74 changes: 74 additions & 0 deletions app/views/graphics/highcharts/_tmp/highstock/_stock_area.js.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
!!!
%html
%head
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
%title Highstock Example
%script{:src => "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", :type => "text/javascript"}
:javascript
$(function() {
$.get('data.csv', function(csv, state, xhr) {

// inconsistency
if (typeof csv != 'string') {
csv = xhr.responseText;
}

// parse the CSV data
var data = [], header, comment = /^#/, x;

$.each(csv.split('\n'), function(i, line){
if (!comment.test(line)) {
if (!header) {
header = line;
}
else {
var point = line.split(';'),
date = point[0].split('-');

if (point.length > 1) {
x = Date.UTC(date[2], date[1] - 1, date[0]);

data.push([
x, // time
parseFloat(point[4]) // close
]);
}
}
}
});

// Create the chart
window.chart = new Highcharts.StockChart({
chart: {
renderTo: 'container'
},

rangeSelector: {
selected: 1
},

title: {
text: 'USD to EUR exchange rate'
},

xAxis: {
maxZoom: 14 * 24 * 3600000 // fourteen days
},
yAxis: {
title: {
text: 'Exchange rate'
}
},

series: [{
name: 'USD to EUR',
data: data,
type: 'area',
threshold: null
}]
});
});
});
%body
%script{:src => "../../js/highstock.js", :type => "text/javascript"}
#container{:style => "height: 500px"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
!!!
%html
%head
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
%title Highstock Example
%script{:src => "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", :type => "text/javascript"}
:javascript
$(function() {
$.get('data.csv', function(csv, state, xhr) {

// inconsistency
if (typeof csv != 'string') {
csv = xhr.responseText;
}

// parse the CSV data
var data = [], header, comment = /^#/, x;

$.each(csv.split('\n'), function(i, line){
if (!comment.test(line)) {
if (!header) {
header = line;
}
else {
var point = line.split(';'),
date = point[0].split('-');

if (point.length > 1) {
x = Date.UTC(date[2], date[1] - 1, date[0]);

data.push([
x, // time
parseFloat(point[4]) // close
]);
}
}
}
});


// Create the chart
window.chart = new Highcharts.StockChart({
chart: {
renderTo: 'container'
},

rangeSelector: {
selected: 1
},

title: {
text: 'USD to EUR exchange rate'
},

xAxis: {
maxZoom: 14 * 24 * 3600000 // fourteen days
},
yAxis: {
title: {
text: 'Exchange rate'
}
},

series: [{
name: 'USD to EUR',
data: data,
type: 'areaspline',
threshold: null
}]
});
});
});
%body
%script{:src => "../../js/highstock.js", :type => "text/javascript"}
#container{:style => "height: 500px"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
!!!
%html
%head
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
%title Highstock Example
%script{:src => "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", :type => "text/javascript"}
:javascript
jQuery(function() {
// Create the chart
window.chart = new Highcharts.StockChart({
chart: {
renderTo: 'container'
},

rangeSelector: {
selected: 1
},

title: {
text: 'USD to EUR exchange rate'
},

xAxis: {
maxZoom: 14 * 24 * 3600000 // fourteen days
},
yAxis: {
title: {
text: 'Exchange rate'
}
},

series: [{
name: 'USD to EUR',
data: usdeur
}]
});
});
%body
%script{:src => "../../js/highstock.js", :type => "text/javascript"}
%script{:src => "../../js/modules/exporting.js", :type => "text/javascript"}
%script{:src => "http://www.highcharts.com/samples/data/usdeur.js", :type => "text/javascript"}
#container{:style => "height: 500px"}
24 changes: 12 additions & 12 deletions app/views/ui/widgets/selectmenu/_background.js.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

/* select with big avatar icons */
a.avatar-big { height: 5em; }
.avatar-big .ui-selectmenu-item-icon { height: 5em; width: 5em; }
.ui-selectmenu-menu li.avatar-big a, a.avatar-big span.ui-selectmenu-status { padding-left: 5em !important; height: 6em; }
.avatar-big .ui-selectmenu-item-icon { height: 50px; width: 50px; }
.ui-selectmenu-menu li.avatar-big a, a.avatar-big span.ui-selectmenu-status { padding-left: 5em !important; height: 50px; }

- content_for :head_scripts do
:javascript
Expand Down Expand Up @@ -45,8 +45,8 @@
],
bgImage: function() {
return 'url(' + $(this).attr("title") + ')';
}
});
}
});

$('select#peopleB').selectmenu({
icons: [
Expand All @@ -58,14 +58,14 @@
});

$('select#peopleC').selectmenu({
//icons: [
// {find: '.avatar-big'}
//],
//bgImage: function() {
// return 'url(' + $(this).attr("title") + ')';
//},
menuWidth: 400,
format: addressFormatting
icons: [
{find: '.avatar-big'}
],
bgImage: function() {
return 'url(' + $(this).attr("title") + ')';
},
menuWidth: 400//,
//format: addressFormatting
});
});

Expand Down
27 changes: 25 additions & 2 deletions app/views/ui/widgets/selectmenu/_disable_enable.js.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
- content_for :head_scripts do
:javascript
$(function() {
$("#radio").buttonset();

var speedA_depends = $('select#speedA_depends').selectmenu();
var speedA = $('select#speedA').selectmenu({
select: function(event, options) {
Expand All @@ -28,8 +26,33 @@
$("#off").click(function(){
speedB.selectmenu("disable");
});
$("#radio").buttonset();

var speedC = $('select#speedC').selectmenu();
$("#optionSwitch").toggle(
function(){
speedC.selectmenu("disable", 2);
},
function(){
speedC.selectmenu("enable", 2);
}
);
$("#optionSwitch").button();

var speedD = $('select#speedD').selectmenu();
$("#optgroupSwitch").toggle(
function(){
speedD.selectmenu("disable", 1, "optgroup");
},
function(){
speedD.selectmenu("enable", 1, "optgroup");
}
);
$("#optgroupSwitch").button();

var speedE = $('select#speedE').selectmenu();

var speedF = $('select#speedF').selectmenu();

var speedG = $('select#speedG').selectmenu();
});
44 changes: 44 additions & 0 deletions app/views/ui/widgets/selectmenu/_overlay.js.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
- content_for :head_stylesheets do
%title OpenLayers Google Layer Example
%link{:href => "http://openlayers.org/dev/examples/../theme/default/style.css", :rel => "stylesheet", :type => "text/css"}/
%link{:href => "http://openlayers.org/dev/examples/../theme/default/google.css", :rel => "stylesheet", :type => "text/css"}/
%link{:href => "http://openlayers.org/dev/examples/style.css", :rel => "stylesheet", :type => "text/css"}/
/ this gmaps key generated for http://openlayers.org/dev/

- content_for :head_scripts do
%script{:src => "http://maps.google.com/maps?file=api"}
%script{:src => "http://openlayers.org/dev/examples/../OpenLayers.js"}
:javascript
var map;

$(function() {
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());

var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: G_PHYSICAL_MAP}
);
var gmap = new OpenLayers.Layer.Google(
"Google Streets", // the default
{numZoomLevels: 20}
);
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: G_HYBRID_MAP, numZoomLevels: 20}
);
var gsat = new OpenLayers.Layer.Google(
"Google Satellite",
{type: G_SATELLITE_MAP, numZoomLevels: 22}
);


map.addLayers([gphy, gmap, ghyb, gsat]);

map.setCenter(new OpenLayers.LonLat(10.2, 48.9), 5);

$("#Selector").selectmenu({style: 'popup',width: 300,menuWidth:300,maxHeight:240});
});

- content_for :license do
= render :partial => "ui/license"
3 changes: 2 additions & 1 deletion app/views/ui/widgets/selectmenu/_positioning.js.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
fieldset { border:0; margin-bottom: 40px;}
label,select,.ui-select-menu { float: left; margin-right: 10px; }
select { width: 200px; }

/*select with custom icons*/
a.customicons { height: 2.8em;}
.customicons li a, a.customicons span.ui-selectmenu-status { line-height: 2em; padding-left: 30px !important; }
Expand All @@ -11,7 +12,7 @@
.podcast .ui-selectmenu-item-icon { background: url("/images/icons/24x24/podcast-square.png") 0 0 no-repeat; }
.rss .ui-selectmenu-item-icon { background: url("/images/icons/24x24/rss-square.png") 0 0 no-repeat; }

/*select with avatar icons*/
/*select with avatar icons*/
a.avatars { height: 2.8em;}
.avatars li a, body a.avatars span.ui-selectmenu-status { line-height: 2em; padding-left: 30px !important; }
.avatar .ui-selectmenu-item-icon { height: 25px; width: 25px; }
Expand Down
Loading

0 comments on commit 76c1d24

Please sign in to comment.