From 80bc2ddf3c0ecd9fde2dc2bd5626ad685cb3d16c Mon Sep 17 00:00:00 2001 From: rylon Date: Tue, 17 Jun 2014 21:07:34 +0200 Subject: [PATCH] friseur team, sai fix, default page cleanup --- config.php | 10 +- .../page/default_page/default_page.css | 62 ------ friseurteam/page/default_page/default_page.js | 209 +----------------- .../page/default_page/default_page.php | 2 +- friseurteam/page/default_page/friseurteam.tpl | 12 + friseurteam/page/default_page/webcraft.tpl | 47 ---- friseurteam/path/PAPI.php | 2 +- friseurteam/path/PPAGE.php | 2 +- friseurteam/path/PSAI.php | 5 + sai.php | 2 +- 10 files changed, 27 insertions(+), 326 deletions(-) create mode 100644 friseurteam/page/default_page/friseurteam.tpl delete mode 100644 friseurteam/page/default_page/webcraft.tpl create mode 100644 friseurteam/path/PSAI.php diff --git a/config.php b/config.php index dd55350..300b6d7 100644 --- a/config.php +++ b/config.php @@ -1,7 +1,7 @@ webcraft, © WebCraft Media 2013'), + array(config_ids::SYS_SAI_CONFIG_TITLE, 'Friseur Team - Admin Area'), + array(config_ids::SYS_SAI_CONFIG_COPYRIGHT, 'Friseur Team, © WebCraft Media 2014'), array(config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, 'system/'), array(config_ids::SYS_CONFIG_LANGS, array('deDE', 'enUS')), - array(config_ids::SYS_CONFIG_DEFAULT_LANG, 'deDE')); - //array(config_ids::WEBCRAFT_BILLING_TOKEN, 'DANUBEdhasda3afdsjadfa3')); \ No newline at end of file + array(config_ids::SYS_CONFIG_DEFAULT_LANG, 'deDE'), + array(config_ids::WEBCRAFT_BILLING_TOKEN, 'DANUBEdhasda3afdsjadfa3')); \ No newline at end of file diff --git a/friseurteam/page/default_page/default_page.css b/friseurteam/page/default_page/default_page.css index 2b0999f..803bd9f 100644 --- a/friseurteam/page/default_page/default_page.css +++ b/friseurteam/page/default_page/default_page.css @@ -1,65 +1,3 @@ -.halfCircleRight{ - cursor: pointer; - position: absolute; - right: 38%; - bottom: 50%; - height:50px; - width:25px; - border-radius: 90px 0 0 90px; - background-color: #333333; - display: table; - z-index: 3; -} - -#navigation-right-wrapper { - box-shadow: 0px 0px 20px black; - //background-color: rgb(244, 244, 244); - background-color: gray; - width: 38%; - height: 100%; - position: absolute; - top: 0px; - right: 0px; - z-index: 2; - //display: none; - opacity: 0.98; -} - -.halfCircleLeft{ - cursor: pointer; - position: absolute; - left: 62%; - bottom: 50%; - height:50px; - width:25px; - border-radius: 0 90px 90px 0; - background-color: #333333; - display: table; - z-index: 3; -} - -#navigation-left-wrapper { - box-shadow: 0px 0px 20px black; - //background-color: rgb(244, 244, 244); - background-color: gray; - width: 62%; - height: 100%; - position: absolute; - top: 0px; - left: 0px; - z-index: 2; - //display: none; - opacity: 0.98; -} - body{ margin: 0; - padding-top: 40px; - padding-bottom: 30px; -} -#map { - position: absolute; - width: 100%; - bottom: 30px; - top: 40px; } \ No newline at end of file diff --git a/friseurteam/page/default_page/default_page.js b/friseurteam/page/default_page/default_page.js index 2ae36a2..077f8bc 100644 --- a/friseurteam/page/default_page/default_page.js +++ b/friseurteam/page/default_page/default_page.js @@ -1,209 +1,2 @@ $(document).ready(function() { - drawmap(); - drawmarker(); - $('#toggle-sidebar').click(function(){ - toggleSidebar();}); - $('#toggle-mainbar').click(function(){ - toggleMainbar();}); - loadPageDetails(3); - - $('#webcraft_nav a').click(function(){ - loadPage($(this).attr('page'));}); - - $('#footer a').click(function(){ - loadPage($(this).attr('page'));}); -}); - -var popupStore = {}; - -var map; -var osm; -var cycle; -var markers; - -// Position und Zoomstufe der Karte -var lon = 8.672434; -var lat = 49.398752; -var zoom = 7; - -var map_div = 'map'; -var map_lang = 'de'; - -function drawmarker(){ - $.ajax({ type :'GET', - url : 'http://www.webcraft-media.de/api.php?call=map&action=markers', - success : function(data) { - if(!data || !data['status']){ - alert('Fail'); - return; - } - data = data['result']; - for (var i in data) { - addMarker(markers, parseFloat(data[i]['lon']), parseFloat(data[i]['lat']), parseInt(data[i]['ID'])); - } - } - }); -} - -function drawmap() { - OpenLayers.Lang.setCode(map_lang); - map = new OpenLayers.Map(map_div, { - projection: new OpenLayers.Projection("EPSG:900913"), - displayProjection: new OpenLayers.Projection("EPSG:4326"), - controls: [ - new OpenLayers.Control.Navigation(), - new OpenLayers.Control.LayerSwitcher(), - new OpenLayers.Control.PanZoomBar(), - ], - //maxExtent: - // new OpenLayers.Bounds(-20037508.34,-20037508.34, - // 20037508.34, 20037508.34), - numZoomLevels: 18, - maxResolution: 156543, - units: 'meters' - }); - - - osm = new OpenLayers.Layer.OSM.Mapnik("Mapnik"); - cycle = new OpenLayers.Layer.OSM.CycleMap("Cycle Map"); - - markers = new OpenLayers.Layer.Markers("Websites", { projection: new OpenLayers.Projection("EPSG:4326"), - visibility: true, displayInLayerSwitcher: false, hover: true }); - - map.addLayers([ cycle, osm, markers]); - jumpTo(lon, lat, zoom); -} - -function jumpTo(lon, lat, zoom) { - var x = Lon2Merc(lon); - var y = Lat2Merc(lat); - map.setCenter(new OpenLayers.LonLat(x, y), zoom); - return false; -} -function Lon2Merc(lon) { - return 20037508.34 * lon / 180; -} - -function Lat2Merc(lat) { - var PI = 3.14159265358979323846; - lat = Math.log(Math.tan( (90 + lat) * PI / 360)) / (PI / 180); - return 20037508.34 * lat / 180; -} - -function addMarker(layer, lon, lat, projectid) { - - var ll = new OpenLayers.LonLat(Lon2Merc(lon), Lat2Merc(lat)); - var feature = new OpenLayers.Feature(layer, ll); - feature.closeBox = true; - //feature.popupClass = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {minSize: new OpenLayers.Size(300, 180)} ); - //feature.data.popupContentHTML = popupContentHTML; - //feature.data.overflow = "hidden"; - - var marker = new OpenLayers.Marker(ll); - marker.feature = feature; - - /*var markerClick = function(evt) { - /*if (this.popup == null) { - this.popup = this.createPopup(this.closeBox); - map.addPopup(this.popup); - this.popup.show(); - } else { - this.popup.toggle(); - } - console.log(popupStore); - OpenLayers.Event.stop(evt); - };*/ - - var markerHover = function(evt){ - loadPageDetails(projectid); - showSidebar(); - } - - //marker.events.register('featurehighlighted', null, markerHover); - marker.events.register("mouseover", feature, markerHover); - - layer.addMarker(marker); - //map.addPopup(feature.createPopup(feature.closeBox)); -} - -function getCycleTileURL(bounds) { - var res = this.map.getResolution(); - var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w)); - var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h)); - var z = this.map.getZoom(); - var limit = Math.pow(2, z); - - if (y < 0 || y >= limit) - { - return null; - } - else - { - x = ((x % limit) + limit) % limit; - - return this.url + z + "/" + x + "/" + y + "." + this.type; - } -} - -function showSidebar() { - $('#toggle-sidebar i').removeClass('icon-chevron-left').addClass('icon-chevron-right'); - $('#navigation-right-wrapper').show(350); - //$('#navigation-right-wrapper').animate({right: '200px'}, 'slow'); - $('#toggle-sidebar').animate({right: '38%'}, 'slow'); -} - -/* -* Hides the left navigation bar with a slide effect -*/ -function hideSidebar() { - $('#toggle-sidebar i').removeClass('icon-chevron-right').addClass('icon-chevron-left'); - $('#navigation-right-wrapper').hide(350); - //$('#navigation-right-wrapper').animate({right: '-200px'}, 'slow'); - $('#toggle-sidebar').animate({right: '0px'}, 'slow'); -} - -function toggleSidebar() { - if($('#navigation-right-wrapper').is(':visible')){ - hideSidebar(); - } else { - showSidebar();} -} - -function loadPageDetails(projectid){ - $('#navigation-right-wrapper').load('./?page=details&projectid='+projectid); -} - -function loadPage(page){ - $('#navigation-left-wrapper').load('./?page='+page,function(){ - switch(page){ - case 'start': - showSidebar(); - showMainbar(); - break; - } - }); -} - -function showMainbar() { - $('#toggle-mainbar i').removeClass('icon-chevron-right').addClass('icon-chevron-left'); - $('#navigation-left-wrapper').show(350); - //$('#navigation-right-wrapper').animate({right: '200px'}, 'slow'); - $('#toggle-mainbar').animate({left: '62%'}, 'slow'); -} - -/* -* Hides the left navigation bar with a slide effect -*/ -function hideMainbar() { - $('#toggle-mainbar i').removeClass('icon-chevron-left').addClass('icon-chevron-right'); - $('#navigation-left-wrapper').hide(350); - //$('#navigation-right-wrapper').animate({right: '-200px'}, 'slow'); - $('#toggle-mainbar').animate({left: '0px'}, 'slow'); -} - -function toggleMainbar() { - if($('#navigation-left-wrapper').is(':visible')){ - hideMainbar(); - } else { - showMainbar();} -} \ No newline at end of file +}); \ No newline at end of file diff --git a/friseurteam/page/default_page/default_page.php b/friseurteam/page/default_page/default_page.php index 0e1e7c8..70e5d4b 100644 --- a/friseurteam/page/default_page/default_page.php +++ b/friseurteam/page/default_page/default_page.php @@ -12,7 +12,7 @@ class default_page extends SYSTEM\PAGE\Page { $vars['js'] = self::js(); $vars['css'] = self::css(); $vars = array_merge($vars, \SYSTEM\locale::getStrings(\DBD\locale_string::CATEGORY_FRISEURTEAM_TEXT)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PPAGE(),'default_page/webcraft.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PPAGE(),'default_page/friseurteam.tpl'), $vars); } public static function css(){ diff --git a/friseurteam/page/default_page/friseurteam.tpl b/friseurteam/page/default_page/friseurteam.tpl new file mode 100644 index 0000000..96b9da5 --- /dev/null +++ b/friseurteam/page/default_page/friseurteam.tpl @@ -0,0 +1,12 @@ + + + + + + ${js} + ${css} + + + tralala + + \ No newline at end of file diff --git a/friseurteam/page/default_page/webcraft.tpl b/friseurteam/page/default_page/webcraft.tpl deleted file mode 100644 index facd809..0000000 --- a/friseurteam/page/default_page/webcraft.tpl +++ /dev/null @@ -1,47 +0,0 @@ - - - - - WebCraft-Media - ${js} - ${css} - - - - - - -
- -
-
- -
- -
- - - \ No newline at end of file diff --git a/friseurteam/path/PAPI.php b/friseurteam/path/PAPI.php index 5acdde5..12845fe 100644 --- a/friseurteam/path/PAPI.php +++ b/friseurteam/path/PAPI.php @@ -1,5 +1,5 @@