Commit 631f8d86 authored by Okhin's avatar Okhin

Adding the nnmon folder

parent d7e5f4c6
This diff is collapsed.
#map {
border: 2px solid #745C1B;
background: #fff url(../img/noise.png);
border-radius: 5px;
margin: 1em;
width: 300px;
height: 280px;
}
svg path { stroke-linejoin: round }
svg .sea {
fill: #fff;
stroke-width: .25px;
}
svg .graticule {
fill: none;
stroke-width: .2px;
}
svg .bg, svg .bgback {
stroke: none;
fill: #fff;
fill-opacity: 1;
}
svg .bgstroke {
stroke: #7C5B27;
stroke-width:.7px;
fill:none;
}
svg .context {
stroke: #D1BEB0;
stroke-opacity: .3;
fill: #D1BEB0;
fill-opacity: .23;
}
svg .fg {
stroke: #cbb;
stroke-opacity: 1;
stroke-dasharray: 3,5;
fill-opacity: .5;
}
svg .fg:hover {
fill: #ada;
fill-opacity: .37;
}
.k-layer-toggle h2 {
margin: 20px 0 10px;
font-size: 20px;
}
.k-layer-toggle label {
margin-left: 3px;
}
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
tinyMCE.init({
mode : "textareas",
width : "180",
height : "600",
theme : "advanced",
theme_advanced_toolbar_align : "left",
theme_advanced_toolbar_location : "top",
theme_advanced_buttons1 : "bold,italic,underline,bullist,numlist,outdent,indent,blockquote,undo,",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
plugins : "paste",
paste_auto_cleanup_on_paste : true,
paste_strip_class_attributes: 'all',
paste_remove_styles: true,
valid_elements : "@[id|title|dir<ltr?rtl|lang|xml::lang],a[rel|rev|"
+ "charset|hreflang|name|href|title],strong/b,em/i,"
+ "strike,u,p,-ol,-ul,-li,br,-sub,-sup,-blockquote,"
+ ",-code,-pre,address,-h1,-h2,-h3,-h4,-h5,"
+ "-h6,hr[size|noshade],dd,dl,dt,cite,abbr,acronym,"
+ "del[datetime|cite],ins[datetime|cite]",
});
This diff is collapsed.
function empty(node) {
if(node.text().trim()) return false;
return true;
}
function check1st4() {
var country=$('#id_country').val();
var op=$('#id_operator').val();
var contract=$('#id_contract').val();
var media=$('#id_media').val();
var div=$('#similar_cases');
if(country && op && contract && media) {
//http://localhost:8001/lookup/?country=HU&contract=asdf&operator=Voda&media=fixed
$.getJSON('/lookup/?country='+country+'&contract='+contract+'&operator='+op+'&media='+media, function(data) {
if (data.length>0) {
div.parent().removeClass('hidden');
} else {
div.parent().addClass('hidden');
}
while(data) {
var val=data.pop();
div.append('<li><a href="/view/'+val[0]+'">'+(val[1] || "no resource given")+'</a></li>');
};
});
$('#id_comment').parent().parent().show().focus();
$('#id_comment_ifr').focus();
$('#id_email').parent().parent().show();
$('#id_consent').parent().parent().show();
$('#id_nick').parent().parent().show();
$('#id_attachments0').parent().parent().show();
$("#save_button").attr('disabled','true').show();
} else {
div.parent().addClass('hidden');
}
}
function init_form() {
$('.help_text').hide();
$(".fieldWrapper").focusin(function(event) {if(!empty($(this).find('.help_text'))) $(this).find('.help_text').show();});
$(".fieldWrapper").focusout(function(event) {if(!empty($(this).find('.help_text'))) $(this).find('.help_text').hide();});
$("#show_optionals").hide();
$("#id_contractual").click(function(event) {
$("#id_contract_excerpt_parent").parent().parent().toggle();
});
$("#show_optionals").click(function(event) {
$(this).hide();
$("#optional .fieldWrapper").show();
$("#id_contract_excerpt_parent").parent().parent().hide();
});
$('#id_country').change(function() { check1st4(); });
$('#id_operator').autocomplete({
source: function( request, response ) {
if(request.term.length>0) {
var country=$('#id_country').attr('value');
$.getJSON('/api/operators/?name__startswith='+request.term, function(data) {
var res=[];
for(var i=0;i<data.objects.length;i++) {
res.push(data.objects[i].name);
}
response(res);
});
}
}
});
$('#id_contract').autocomplete({
source: function( request, response ) {
if(request.term.length>0) {
var operator=$('#id_operator').attr('value');
var country=$('#id_country').attr('value');
$.getJSON('/api/violations/?country='+country+'&operator_ref__name='+operator+'&contract__contains='+request.term, function(data) {
var res=[];
for(var i=0;i<data.objects.length;i++) {
res.push(data.objects[i].contract);
}
response(res);
});
}
}
});
$('#id_operator').change(function() { check1st4(); });
$('#id_contract').change(function() { check1st4(); });
$('#id_media').change(function() { check1st4(); });
$('#id_email').change(function() {
if($(this).val().length>0) {
$('#id_captcha_0').parent().parent().show();
$('#save_button').removeAttr('disabled');
$("#show_optionals").show();
}
});
$("form").bind("keypress", function(e) {
if (e.keyCode == 13) {
e.preventDefault();
$(e.target).change();
return false;
}
return true;
});
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
$(document).ready(function() {
var onCountryClick = function(target) {
window.location='/list/'+target.iso2+"/";
};
$(function() {
window.map = $K.map('#map');
map.loadMap('/site_media/eu.svg', function(map) {
map
.addLayer('eu', 'bgback')
.addLayer('eu', 'bg')
.addLayer('eu', 'bgstroke')
.addLayer({'id': 'countries', 'className': 'context'})
.addLayer('graticule')
.addLayer({'id': 'eu',
'className': 'fg',
'tooltip': {
content: function(obj,foo) {
var count=0;
if(data) {
for(var i=0;i<data.length;i++) {
if(data[i].iso2==foo.data.iso2) {
count=data[i].w;
break;
}
}
}
if(count>0) {
return foo.data.name+"<br />"+count+" reported cases";
} else {
return foo.data.name;
}
}
},
'key': "iso2"
});
map.onLayerEvent('click', onCountryClick, 'fg')
map.addFilter('oglow', 'glow', { size: 3, color: '#988', strength: 1, inner: false });
map.getLayer('bgback').applyFilter('oglow');
map.addFilter('myglow', 'glow', { size: 2, color: '#945C1B', inner: true });
map.getLayer('bg').applyFilter('myglow');
colorscale = new chroma.ColorScale({
colors: chroma.brewer.YlGnBu,
limits: chroma.limits(data, 'q', 6, 'w')
});
if(data) {
map.choropleth({
data: data,
layer: 'fg',
key: 'iso2',
colors: function(d) {
if (d == null) return '#fff';
return colorscale.getColor(d['w']);
},
duration: 0
});
}
});
});
});
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*!
* $script.js Async loader & dependency manager
* https://github.com/ded/script.js
* (c) Dustin Diaz, Jacob Thornton 2011
* License: MIT
*/
!function(a,b){typeof define=="function"?define(b):typeof module!="undefined"?module.exports=b():this[a]=b()}("$script",function(){function s(a,b,c){for(c=0,j=a.length;c<j;++c)if(!b(a[c]))return m;return 1}function t(a,b){s(a,function(a){return!b(a)})}function u(a,b,c){function o(a){return a.call?a():f[a]}function p(){if(!--m){f[l]=1,j&&j();for(var a in h)s(a.split("|"),o)&&!t(h[a],o)&&(h[a]=[])}}a=a[n]?a:[a];var e=b&&b.call,j=e?b:c,l=e?a.join(""):b,m=a.length;return setTimeout(function(){t(a,function(a){if(k[a])return l&&(g[l]=1),k[a]==2&&p();k[a]=1,l&&(g[l]=1),v(!d.test(a)&&i?i+a+".js":a,p)})},0),u}function v(a,d){var e=b.createElement("script"),f=m;e.onload=e.onerror=e[r]=function(){if(e[p]&&!/^c|loade/.test(e[p])||f)return;e.onload=e[r]=null,f=1,k[a]=2,d()},e.async=1,e.src=a,c.insertBefore(e,c.firstChild)}var a=this,b=document,c=b.getElementsByTagName("head")[0],d=/^https?:\/\//,e=a.$script,f={},g={},h={},i,k={},l="string",m=!1,n="push",o="DOMContentLoaded",p="readyState",q="addEventListener",r="onreadystatechange";return!b[p]&&b[q]&&(b[q](o,function w(){b.removeEventListener(o,w,m),b[p]="complete"},m),b[p]="loading"),u.get=v,u.order=function(a,b,c){(function d(e){e=a.shift(),a.length?u(e,d):u(e,b,c)})()},u.path=function(a){i=a},u.ready=function(a,b,c){a=a[n]?a:[a];var d=[];return!t(a,function(a){f[a]||d[n](a)})&&s(a,function(a){return f[a]})?b():!function(a){h[a]=h[a]||[],h[a][n](b),c&&c(d)}(a.join("|")),u},u.noConflict=function(){return a.$script=e,this},u})
\ No newline at end of file
<html>
<head>
<title>TinyMCE Debian Test</title>
<script language="javascript" type="text/javascript" src="/tinymce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas"
});
</script>
</head>
<body>
<h1>TinyMCE Debian Test</h1>
<form method="post">
<textarea name="content" cols="50" rows="15">This is some content that will be editable with TinyMCE.</textarea>
</form>
</body>
</html>
function djangoFileBrowser(field_name, url, type, win) {
var url = "{{ fb_url }}?pop=2&type=" + type;
tinyMCE.activeEditor.windowManager.open(
{
'file': url,
'width': 820,
'height': 500,
'resizable': "yes",
'scrollbars': "yes",
'inline': "no",
'close_previous': "no"
},
{
'window': win,
'input': field_name,
'editor_id': tinyMCE.selectedInstance.editorId
}
);
return false;
}
This diff is collapsed.
input.radio {border:1px none #000; background:transparent; vertical-align:middle;}
.panel_wrapper div.current {height:80px;}
#width {width:50px; vertical-align:middle;}
#width2 {width:50px; vertical-align:middle;}
#size {width:100px;}
(function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})();
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
tinyMCE.addI18n('en.advhr_dlg',{
width:"Width",
size:"Height",
noshade:"No shadow"
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
tinyMCE.addI18n('en.autosave',{
restore_content: "Restore auto-saved content",
warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?"
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.