Initial import (partially)

This commit is contained in:
2013-11-23 15:54:25 +01:00
parent 852e1e619c
commit 2082b0bba6
40 changed files with 9015 additions and 1496 deletions

View File

@@ -44,7 +44,6 @@ public class BeanUtils {
} }
/** /**
*
* @return BeanManager * @return BeanManager
* @throws javax.naming.NamingException * @throws javax.naming.NamingException
*/ */

View File

@@ -8,6 +8,7 @@ import java.util.zip.GZIPOutputStream;
/** /**
* The type Zip utils. * The type Zip utils.
*
* @author Daniel Scheidle * @author Daniel Scheidle
* daniel.scheidle@ucs.at * daniel.scheidle@ucs.at
* Unique Computing Solutions GmbH * Unique Computing Solutions GmbH
@@ -34,8 +35,7 @@ public class ZipUtils {
outputStream = new ByteArrayOutputStream(); outputStream = new ByteArrayOutputStream();
compress(inputStream, outputStream); compress(inputStream, outputStream);
return outputStream.toByteArray(); return outputStream.toByteArray();
} } catch (Exception e) {
catch(Exception e) {
throw new Exception(e.getMessage(), e); throw new Exception(e.getMessage(), e);
} finally { } finally {
if (outputStream != null) outputStream.close(); if (outputStream != null) outputStream.close();
@@ -60,8 +60,7 @@ public class ZipUtils {
outputStream = new ByteArrayOutputStream(); outputStream = new ByteArrayOutputStream();
decompress(inputStream, outputStream); decompress(inputStream, outputStream);
return outputStream.toByteArray(); return outputStream.toByteArray();
} } catch (Exception e) {
catch(Exception e) {
throw new Exception(e.getMessage(), e); throw new Exception(e.getMessage(), e);
} finally { } finally {
if (outputStream != null) outputStream.close(); if (outputStream != null) outputStream.close();

View File

@@ -15,13 +15,11 @@ import java.text.SimpleDateFormat;
*/ */
@Provider @Provider
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public class JsonConfiguration implements ContextResolver<ObjectMapper> public class JsonConfiguration implements ContextResolver<ObjectMapper> {
{
private final ObjectMapper objectMapper; private final ObjectMapper objectMapper;
public JsonConfiguration() throws Exception public JsonConfiguration() throws Exception {
{
this.objectMapper = new ObjectMapper(); this.objectMapper = new ObjectMapper();
this.objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ")); this.objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"));
@@ -29,8 +27,7 @@ public class JsonConfiguration implements ContextResolver<ObjectMapper>
} }
public ObjectMapper getContext(Class<?> objectType) public ObjectMapper getContext(Class<?> objectType) {
{
return objectMapper; return objectMapper;
} }
} }

View File

@@ -12,5 +12,4 @@ import javax.ws.rs.core.Application;
public class ServiceApplication extends Application { public class ServiceApplication extends Application {
} }

View File

@@ -16,7 +16,6 @@
</listener> </listener>
<!-- RESTeasy Servlet for generating js client stubs --> <!-- RESTeasy Servlet for generating js client stubs -->
<servlet> <servlet>
<servlet-name>RESTEasy JSAPI</servlet-name> <servlet-name>RESTEasy JSAPI</servlet-name>

View File

@@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="X-UA-Compatible" content="IE=8"> <meta http-equiv="X-UA-Compatible" content="IE=8">

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,13 +1,69 @@
.cleditorMain {border:1px solid #999; padding:0 1px 1px; background-color:white} .cleditorMain {
.cleditorMain iframe {border:none; margin:0; padding:0} border: 1px solid #999;
.cleditorMain textarea {border:none; margin:0; padding:0; overflow-y:scroll; font:10pt Arial,Verdana; resize:none; outline:none /* webkit grip focus */} padding: 0 1px 1px;
.cleditorToolbar {background: url('images/toolbar.gif') repeat} background-color: white
.cleditorGroup {float:left; height:26px} }
.cleditorButton {float:left; width:24px; height:24px; margin:1px 0 1px 0; background: url('images/buttons.gif')}
.cleditorDisabled {opacity:0.3; filter:alpha(opacity=30)} .cleditorMain iframe {
.cleditorDivider {float:left; width:1px; height:23px; margin:1px 0 1px 0; background:#CCC} border: none;
.cleditorPopup {border:solid 1px #999; background-color:white; color:#333333; position:absolute; font:10pt Arial,Verdana; cursor:default; z-index:10000} margin: 0;
.cleditorList div {padding:2px 4px 2px 4px} padding: 0
}
.cleditorMain textarea {
border: none;
margin: 0;
padding: 0;
overflow-y: scroll;
font: 10pt Arial, Verdana;
resize: none;
outline: none /* webkit grip focus */
}
.cleditorToolbar {
background: url('images/toolbar.gif') repeat
}
.cleditorGroup {
float: left;
height: 26px
}
.cleditorButton {
float: left;
width: 24px;
height: 24px;
margin: 1px 0 1px 0;
background: url('images/buttons.gif')
}
.cleditorDisabled {
opacity: 0.3;
filter: alpha(opacity=30)
}
.cleditorDivider {
float: left;
width: 1px;
height: 23px;
margin: 1px 0 1px 0;
background: #CCC
}
.cleditorPopup {
border: solid 1px #999;
background-color: white;
color: #333333;
position: absolute;
font: 10pt Arial, Verdana;
cursor: default;
z-index: 10000
}
.cleditorList div {
padding: 2px 4px 2px 4px
}
.cleditorList p, .cleditorList p,
.cleditorList h1, .cleditorList h1,
.cleditorList h2, .cleditorList h2,
@@ -15,10 +71,38 @@
.cleditorList h4, .cleditorList h4,
.cleditorList h5, .cleditorList h5,
.cleditorList h6, .cleditorList h6,
.cleditorList font {padding:0; margin:0; background-color:Transparent} .cleditorList font {
.cleditorColor {width:150px; padding:1px 0 0 1px} padding: 0;
.cleditorColor div {float:left; width:14px; height:14px; margin:0 1px 1px 0} margin: 0;
.cleditorPrompt {background-color:#F6F7F9; padding:4px; font-size:8.5pt} background-color: Transparent
}
.cleditorColor {
width: 150px;
padding: 1px 0 0 1px
}
.cleditorColor div {
float: left;
width: 14px;
height: 14px;
margin: 0 1px 1px 0
}
.cleditorPrompt {
background-color: #F6F7F9;
padding: 4px;
font-size: 8.5pt
}
.cleditorPrompt input, .cleditorPrompt input,
.cleditorPrompt textarea {font:8.5pt Arial,Verdana;} .cleditorPrompt textarea {
.cleditorMsg {background-color:#FDFCEE; width:150px; padding:4px; font-size:8.5pt} font: 8.5pt Arial, Verdana;
}
.cleditorMsg {
background-color: #FDFCEE;
width: 150px;
padding: 4px;
font-size: 8.5pt
}

View File

@@ -1,5 +1,3 @@
/* /*
* Table * Table
*/ */
@@ -29,16 +27,37 @@ table.dataTable td.dataTables_empty {
text-align: center; text-align: center;
} }
table.dataTable tr.odd { background-color: #E2E4FF; } table.dataTable tr.odd {
table.dataTable tr.even { background-color: white; } background-color: #E2E4FF;
}
table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; } table.dataTable tr.even {
table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; } background-color: white;
table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; } }
table.dataTable tr.even td.sorting_1 { background-color: #EAEBFF; }
table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; }
table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
table.dataTable tr.odd td.sorting_1 {
background-color: #D3D6FF;
}
table.dataTable tr.odd td.sorting_2 {
background-color: #DADCFF;
}
table.dataTable tr.odd td.sorting_3 {
background-color: #E0E2FF;
}
table.dataTable tr.even td.sorting_1 {
background-color: #EAEBFF;
}
table.dataTable tr.even td.sorting_2 {
background-color: #F2F3FF;
}
table.dataTable tr.even td.sorting_3 {
background-color: #F9F9FF;
}
/* /*
* Table wrapper * Table wrapper
@@ -48,14 +67,15 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
clear: both; clear: both;
*zoom: 1; *zoom: 1;
} }
.dataTables_wrapper .ui-widget-header { .dataTables_wrapper .ui-widget-header {
font-weight: normal; font-weight: normal;
} }
.dataTables_wrapper .ui-toolbar { .dataTables_wrapper .ui-toolbar {
padding: 5px; padding: 5px;
} }
/* /*
* Page length menu * Page length menu
*/ */
@@ -63,7 +83,6 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
float: left; float: left;
} }
/* /*
* Filter * Filter
*/ */
@@ -72,7 +91,6 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
text-align: right; text-align: right;
} }
/* /*
* Table information * Table information
*/ */
@@ -82,7 +100,6 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
float: left; float: left;
} }
/* /*
* Pagination * Pagination
*/ */
@@ -120,12 +137,14 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
*cursor: hand; *cursor: hand;
color: #111 !important; color: #111 !important;
} }
.paginate_disabled_previous:hover, .paginate_disabled_previous:hover,
.paginate_enabled_previous:hover, .paginate_enabled_previous:hover,
.paginate_disabled_next:hover, .paginate_disabled_next:hover,
.paginate_enabled_next:hover { .paginate_enabled_next:hover {
text-decoration: none !important; text-decoration: none !important;
} }
.paginate_disabled_previous:active, .paginate_disabled_previous:active,
.paginate_enabled_previous:active, .paginate_enabled_previous:active,
.paginate_disabled_next:active, .paginate_disabled_next:active,
@@ -137,28 +156,47 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
.paginate_disabled_next { .paginate_disabled_next {
color: #666 !important; color: #666 !important;
} }
.paginate_disabled_previous, .paginate_disabled_previous,
.paginate_enabled_previous { .paginate_enabled_previous {
padding-left: 23px; padding-left: 23px;
} }
.paginate_disabled_next, .paginate_disabled_next,
.paginate_enabled_next { .paginate_enabled_next {
padding-right: 23px; padding-right: 23px;
margin-left: 10px; margin-left: 10px;
} }
.paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat top left; } .paginate_enabled_previous {
.paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat top left; } background: url('../images/back_enabled.png') no-repeat top left;
.paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat top left; } }
.paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat top right; } .paginate_enabled_previous:hover {
.paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat top right; } background: url('../images/back_enabled_hover.png') no-repeat top left;
.paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat top right; } }
.paginate_disabled_previous {
background: url('../images/back_disabled.png') no-repeat top left;
}
.paginate_enabled_next {
background: url('../images/forward_enabled.png') no-repeat top right;
}
.paginate_enabled_next:hover {
background: url('../images/forward_enabled_hover.png') no-repeat top right;
}
.paginate_disabled_next {
background: url('../images/forward_disabled.png') no-repeat top right;
}
/* Full number pagination */ /* Full number pagination */
.paging_full_numbers a:active { .paging_full_numbers a:active {
outline: none outline: none
} }
.paging_full_numbers a:hover { .paging_full_numbers a:hover {
text-decoration: none; text-decoration: none;
} }
@@ -189,7 +227,6 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
background-color: #99B3FF; background-color: #99B3FF;
} }
/* /*
* Processing indicator * Processing indicator
*/ */
@@ -209,7 +246,6 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
background-color: white; background-color: white;
} }
/* /*
* Sorting * Sorting
*/ */
@@ -229,7 +265,6 @@ table.dataTable th:active {
outline: none; outline: none;
} }
/* /*
* Scrolling * Scrolling
*/ */

View File

@@ -1,5 +1,3 @@
/* /*
* Table * Table
*/ */
@@ -29,8 +27,13 @@ table.dataTable td.dataTables_empty {
text-align: center; text-align: center;
} }
table.dataTable tr.odd { background-color: #f0fff0; } table.dataTable tr.odd {
table.dataTable tr.even { background-color: #ffffff; } background-color: #f0fff0;
}
table.dataTable tr.even {
background-color: #ffffff;
}
/*table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; }*/ /*table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; }*/
/*table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; }*/ /*table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; }*/
@@ -39,7 +42,6 @@ table.dataTable tr.even { background-color: #ffffff; }
/*table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; }*/ /*table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; }*/
/*table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }*/ /*table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }*/
/* /*
* Table wrapper * Table wrapper
*/ */
@@ -48,14 +50,15 @@ table.dataTable tr.even { background-color: #ffffff; }
clear: both; clear: both;
*zoom: 1; *zoom: 1;
} }
.dataTables_wrapper .ui-widget-header { .dataTables_wrapper .ui-widget-header {
font-weight: normal; font-weight: normal;
} }
.dataTables_wrapper .ui-toolbar { .dataTables_wrapper .ui-toolbar {
padding: 5px; padding: 5px;
} }
/* /*
* Page length menu * Page length menu
*/ */
@@ -63,7 +66,6 @@ table.dataTable tr.even { background-color: #ffffff; }
float: left; float: left;
} }
/* /*
* Filter * Filter
*/ */
@@ -72,7 +74,6 @@ table.dataTable tr.even { background-color: #ffffff; }
text-align: right; text-align: right;
} }
/* /*
* Table information * Table information
*/ */
@@ -82,7 +83,6 @@ table.dataTable tr.even { background-color: #ffffff; }
float: left; float: left;
} }
/* /*
* Pagination * Pagination
*/ */
@@ -120,12 +120,14 @@ table.dataTable tr.even { background-color: #ffffff; }
*cursor: hand; *cursor: hand;
color: #111 !important; color: #111 !important;
} }
.paginate_disabled_previous:hover, .paginate_disabled_previous:hover,
.paginate_enabled_previous:hover, .paginate_enabled_previous:hover,
.paginate_disabled_next:hover, .paginate_disabled_next:hover,
.paginate_enabled_next:hover { .paginate_enabled_next:hover {
text-decoration: none !important; text-decoration: none !important;
} }
.paginate_disabled_previous:active, .paginate_disabled_previous:active,
.paginate_enabled_previous:active, .paginate_enabled_previous:active,
.paginate_disabled_next:active, .paginate_disabled_next:active,
@@ -137,28 +139,47 @@ table.dataTable tr.even { background-color: #ffffff; }
.paginate_disabled_next { .paginate_disabled_next {
color: #666 !important; color: #666 !important;
} }
.paginate_disabled_previous, .paginate_disabled_previous,
.paginate_enabled_previous { .paginate_enabled_previous {
padding-left: 23px; padding-left: 23px;
} }
.paginate_disabled_next, .paginate_disabled_next,
.paginate_enabled_next { .paginate_enabled_next {
padding-right: 23px; padding-right: 23px;
margin-left: 10px; margin-left: 10px;
} }
.paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat top left; } .paginate_enabled_previous {
.paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat top left; } background: url('../images/back_enabled.png') no-repeat top left;
.paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat top left; } }
.paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat top right; } .paginate_enabled_previous:hover {
.paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat top right; } background: url('../images/back_enabled_hover.png') no-repeat top left;
.paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat top right; } }
.paginate_disabled_previous {
background: url('../images/back_disabled.png') no-repeat top left;
}
.paginate_enabled_next {
background: url('../images/forward_enabled.png') no-repeat top right;
}
.paginate_enabled_next:hover {
background: url('../images/forward_enabled_hover.png') no-repeat top right;
}
.paginate_disabled_next {
background: url('../images/forward_disabled.png') no-repeat top right;
}
/* Full number pagination */ /* Full number pagination */
.paging_full_numbers a:active { .paging_full_numbers a:active {
outline: none outline: none
} }
.paging_full_numbers a:hover { .paging_full_numbers a:hover {
text-decoration: none; text-decoration: none;
} }
@@ -189,7 +210,6 @@ table.dataTable tr.even { background-color: #ffffff; }
background-color: #99B3FF; background-color: #99B3FF;
} }
/* /*
* Processing indicator * Processing indicator
*/ */
@@ -209,7 +229,6 @@ table.dataTable tr.even { background-color: #ffffff; }
background-color: white; background-color: white;
} }
/* /*
* Sorting * Sorting
*/ */
@@ -229,7 +248,6 @@ table.dataTable th:active {
outline: none; outline: none;
} }
/* /*
* Scrolling * Scrolling
*/ */

View File

@@ -1,6 +1,3 @@
/* G L O B A L */ /* G L O B A L */
html, body { html, body {
font-family: Verdana, serif; font-family: Verdana, serif;
@@ -24,6 +21,7 @@ h1 {
#migor-titleBar .logo { #migor-titleBar .logo {
float: left; float: left;
} }
#migor-titleBar .headline { #migor-titleBar .headline {
color: #649C21; color: #649C21;
float: left; float: left;
@@ -35,6 +33,7 @@ h1 {
position: relative; position: relative;
width: 600px; width: 600px;
} }
#migor-titleBar .headline .subHeadline { #migor-titleBar .headline .subHeadline {
color: #333333; color: #333333;
font-size: 16px; font-size: 16px;
@@ -42,6 +41,7 @@ h1 {
position: relative; position: relative;
top: 10px; top: 10px;
} }
#migor-titleBar .company { #migor-titleBar .company {
font-size: 11px; font-size: 11px;
font-weight: bold; font-weight: bold;
@@ -51,7 +51,6 @@ h1 {
white-space: nowrap; white-space: nowrap;
} }
/* M E N U */ /* M E N U */
#migor-menuBar { #migor-menuBar {
background: url("images/ui-bg_highlight-hard_75_e6e6e6_1x100.png") repeat-x scroll 50% 50% #EEEEEE; background: url("images/ui-bg_highlight-hard_75_e6e6e6_1x100.png") repeat-x scroll 50% 50% #EEEEEE;
@@ -60,7 +59,6 @@ h1 {
/* D I A L O G */ /* D I A L O G */
ul.service-config { ul.service-config {
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
@@ -73,7 +71,6 @@ li.service-config {
padding: 5px; padding: 5px;
} }
/* W I D G E T S */ /* W I D G E T S */
/* Form */ /* Form */
@@ -162,7 +159,6 @@ p.form-element-error-message {
padding: 0 0 5px 0; padding: 0 0 5px 0;
} }
div.from-error-message { div.from-error-message {
margin: 0 0 10px 115px; margin: 0 0 10px 115px;
} }
@@ -179,7 +175,6 @@ a.ui-tabs-anchor.closable span.ui-icon {
top: 7px; top: 7px;
} }
/*Button*/ /*Button*/
.migor-button { .migor-button {
display: block; display: block;
@@ -235,15 +230,49 @@ a.ui-tabs-anchor.closable span.ui-icon {
font-weight: normal; font-weight: normal;
} }
.ui-timepicker-div .ui-widget-header {
margin-bottom: 8px;
}
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; } .ui-timepicker-div dl {
.ui-timepicker-div dl { text-align: left; } text-align: left;
.ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; } }
.ui-timepicker-div dl dd { margin: 0 10px 10px 40%; }
.ui-timepicker-div td { font-size: 90%; }
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
.ui-timepicker-rtl{ direction: rtl; } .ui-timepicker-div dl dt {
.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; } float: left;
.ui-timepicker-rtl dl dt{ float: right; clear: right; } clear: left;
.ui-timepicker-rtl dl dd { margin: 0 40% 10px 10px; } padding: 0 0 0 5px;
}
.ui-timepicker-div dl dd {
margin: 0 10px 10px 40%;
}
.ui-timepicker-div td {
font-size: 90%;
}
.ui-tpicker-grid-label {
background: none;
border: none;
margin: 0;
padding: 0;
}
.ui-timepicker-rtl {
direction: rtl;
}
.ui-timepicker-rtl dl {
text-align: right;
padding: 0 5px 0 0;
}
.ui-timepicker-rtl dl dt {
float: right;
clear: right;
}
.ui-timepicker-rtl dl dd {
margin: 0 40% 10px 10px;
}

View File

@@ -43,7 +43,6 @@
<script type="text/javascript" src="js/plugins/khtml_all.js"></script> <script type="text/javascript" src="js/plugins/khtml_all.js"></script>
<% if (debug) { %> <% if (debug) { %>
<script type="text/javascript" src="js/widgets/widget-geoLocation.js"></script> <script type="text/javascript" src="js/widgets/widget-geoLocation.js"></script>
<script type="text/javascript" src="js/widgets/widget-components.js"></script> <script type="text/javascript" src="js/widgets/widget-components.js"></script>

View File

@@ -18,16 +18,14 @@ migor.bootstrap = new function () {
var menuSettings = [ var menuSettings = [
{ {
"label": 'System', "label": 'System',
"menus": "menus": [
[
{page: migor.pageNodeStatus}, {page: migor.pageNodeStatus},
{page: migor.pageCacheEntries} {page: migor.pageCacheEntries}
] ]
}, },
{ {
"label": 'Location', "label": 'Location',
"menus": "menus": [
[
{page: migor.pageLocationEntries} {page: migor.pageLocationEntries}
] ]
} }

View File

@@ -3,7 +3,9 @@ $.widget("hpip.form", {
elements: [], elements: [],
options: { options: {
data: null, data: null,
elementOptions: [{name:"test", label:"Test"}], elementOptions: [
{name: "test", label: "Test"}
],
errorClass: 'ui-state-error ui-corner-all' errorClass: 'ui-state-error ui-corner-all'
}, },
_create: function () { _create: function () {

View File

@@ -16,9 +16,6 @@ $.widget("migor.openMap", {
self.map.addOverlay(new khtml.maplib.ui.Zoombar()); self.map.addOverlay(new khtml.maplib.ui.Zoombar());
self.markers = []; self.markers = [];
}, },
center: function (latitude, longitude, zoom) { center: function (latitude, longitude, zoom) {
@@ -32,11 +29,14 @@ $.widget("migor.openMap", {
type: "Feature", type: "Feature",
geometry: { geometry: {
type: "Polygon", type: "Polygon",
coordinates:[[ coordinates: [
[
[bbox.leftTopLongitude, bbox.leftTopLatitude], [bbox.leftTopLongitude, bbox.leftTopLatitude],
[bbox.rightBottomLongitude, bbox.leftTopLatitude], [bbox.rightBottomLongitude, bbox.leftTopLatitude],
[bbox.rightBottomLongitude, bbox.rightBottomLatitude], [bbox.rightBottomLongitude, bbox.rightBottomLatitude],
[bbox.leftTopLongitude, bbox.rightBottomLatitude]]] [bbox.leftTopLongitude, bbox.rightBottomLatitude]
]
]
}, },
style: { style: {
fill: color, fill: color,

View File

@@ -12,8 +12,6 @@
<link href="css/jquery.mobile-1.3.2.min.css?_=<%=buildDate%>" rel="stylesheet" type="text/css"/> <link href="css/jquery.mobile-1.3.2.min.css?_=<%=buildDate%>" rel="stylesheet" type="text/css"/>
<%-- Plugins --%> <%-- Plugins --%>
<script type="text/javascript" src="js/plugin/jquery-1.10.2.js?_=<%=buildDate%>"></script> <script type="text/javascript" src="js/plugin/jquery-1.10.2.js?_=<%=buildDate%>"></script>
<script type="text/javascript" src="js/plugin/jquery.mobile-1.3.2.js?_=<%=buildDate%>"></script> <script type="text/javascript" src="js/plugin/jquery.mobile-1.3.2.js?_=<%=buildDate%>"></script>
@@ -22,10 +20,6 @@
<script type="text/javascript" src="js/widget/widget-chat.js?_=<%=buildDate%>"></script> <script type="text/javascript" src="js/widget/widget-chat.js?_=<%=buildDate%>"></script>
<!-- EXECUTE INIT SCRIPT --> <!-- EXECUTE INIT SCRIPT -->
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {

File diff suppressed because one or more lines are too long

View File

@@ -16,7 +16,6 @@
<script type="text/javascript" src="js/plugin/jquery.mobile-1.3.2.js?_=<%=buildDate%>"></script> <script type="text/javascript" src="js/plugin/jquery.mobile-1.3.2.js?_=<%=buildDate%>"></script>
<!-- EXECUTE INIT SCRIPT --> <!-- EXECUTE INIT SCRIPT -->
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
@@ -65,6 +64,7 @@
<p> <p>
<input id="username" type="text" value="" placeholder="Username"/> <input id="username" type="text" value="" placeholder="Username"/>
</p> </p>
<p> <p>
<button id="startButton" data-role="button">Start</button> <button id="startButton" data-role="button">Start</button>
</p> </p>

View File

@@ -17,16 +17,14 @@ var bb = {
blackberryTimeoutId: -1 blackberryTimeoutId: -1
}; };
function handleBlackBerryLocationTimeout() function handleBlackBerryLocationTimeout() {
{
if (bb.blackberryTimeoutId != -1) { if (bb.blackberryTimeoutId != -1) {
bb.error({ message: "Timeout error", bb.error({ message: "Timeout error",
code: 3 code: 3
}); });
} }
} }
function handleBlackBerryLocation() function handleBlackBerryLocation() {
{
clearTimeout(bb.blackberryTimeoutId); clearTimeout(bb.blackberryTimeoutId);
bb.blackberryTimeoutId = -1; bb.blackberryTimeoutId = -1;
if (bb.success && bb.error) { if (bb.success && bb.error) {
@@ -35,13 +33,11 @@ function handleBlackBerryLocation()
//POSITION_UNAVAILABLE (numeric value 2) //POSITION_UNAVAILABLE (numeric value 2)
bb.error({message: "Position unavailable", code: 2}); bb.error({message: "Position unavailable", code: 2});
} }
else else {
{
var timestamp = null; var timestamp = null;
//only available with 4.6 and later //only available with 4.6 and later
//http://na.blackberry.com/eng/deliverables/8861/blackberry_location_568404_11.jsp //http://na.blackberry.com/eng/deliverables/8861/blackberry_location_568404_11.jsp
if (blackberry.location.timestamp) if (blackberry.location.timestamp) {
{
timestamp = new Date(blackberry.location.timestamp); timestamp = new Date(blackberry.location.timestamp);
} }
bb.success({ timestamp: timestamp, bb.success({ timestamp: timestamp,
@@ -67,8 +63,7 @@ var geoPosition=function() {
var u = "undefined"; var u = "undefined";
var ipGeolocationSrv = 'http://freegeoip.net/json/?callback=JSONPCallback'; var ipGeolocationSrv = 'http://freegeoip.net/json/?callback=JSONPCallback';
pub.getCurrentPosition = function(success,error,opts) pub.getCurrentPosition = function (success, error, opts) {
{
provider.getCurrentPosition(success, error, opts); provider.getCurrentPosition(success, error, opts);
} }
@@ -92,15 +87,12 @@ var geoPosition=function() {
} }
}; };
pub.confirmation = function() pub.confirmation = function () {
{
return confirm('This Webpage wants to track your physical location.\nDo you allow it?'); return confirm('This Webpage wants to track your physical location.\nDo you allow it?');
}; };
pub.init = function() pub.init = function () {
{ try {
try
{
var hasGeolocation = typeof(navigator.geolocation) != u; var hasGeolocation = typeof(navigator.geolocation) != u;
if (!hasGeolocation) { if (!hasGeolocation) {
if (!pub.confirmation()) { if (!pub.confirmation()) {
@@ -131,6 +123,7 @@ var geoPosition=function() {
} }
success(params); success(params);
} }
provider.getCurrentPosition(_success, error, opts); provider.getCurrentPosition(_success, error, opts);
} }
} else if (typeof(window.blackberry) != u && blackberry.location.GPSSupported) { } else if (typeof(window.blackberry) != u && blackberry.location.GPSSupported) {
@@ -140,8 +133,7 @@ var geoPosition=function() {
} }
blackberry.location.setAidMode(2); blackberry.location.setAidMode(2);
//override default method implementation //override default method implementation
pub.getCurrentPosition = function(success,error,opts) pub.getCurrentPosition = function (success, error, opts) {
{
//passing over callbacks as parameter didn't work consistently //passing over callbacks as parameter didn't work consistently
//In the onLocationUpdate method, thats why they have to be set outside //In the onLocationUpdate method, thats why they have to be set outside
bb.success = success; bb.success = success;
@@ -232,6 +224,7 @@ var geoPosition=function() {
}); });
} }
} }
//location criteria //location criteria
var criteria = new Object(); var criteria = new Object();
@@ -242,13 +235,15 @@ var geoPosition=function() {
} else { } else {
pub.getCurrentPosition = function (success, error, opts) { pub.getCurrentPosition = function (success, error, opts) {
pub.jsonp.fetch(ipGeolocationSrv, pub.jsonp.fetch(ipGeolocationSrv,
function( p ){ success( { timestamp: p.timestamp, function (p) {
success({ timestamp: p.timestamp,
coords: { coords: {
latitude: p.latitude, latitude: p.latitude,
longitude: p.longitude, longitude: p.longitude,
heading: p.heading heading: p.heading
} }
});}); });
});
} }
provider = true; provider = true;
} }