diff --git a/frontend/views/site/index.php b/frontend/views/site/index.php
index be7b7a9..a2962ea 100755
--- a/frontend/views/site/index.php
+++ b/frontend/views/site/index.php
@@ -10,26 +10,6 @@
$this->title = 'My Yii Application';
?>
-
-
-
-
-
- */
- ?>
diff --git a/frontend/web/js/artbox.maps.js b/frontend/web/js/artbox.maps.js
new file mode 100644
index 0000000..073ca61
--- /dev/null
+++ b/frontend/web/js/artbox.maps.js
@@ -0,0 +1,259 @@
+var company_map = [];
+var main_map = [];
+$(
+ function()
+ {
+ initMap(company_map);
+ initMainMap(main_map);
+ $(document).on(
+ 'click', '.map_company_filter', function(e)
+ {
+ e.preventDefault();
+ var id = $(this).data('id');
+ var user = $('#map_company').data('user');
+ $.ajax(
+ {
+ url : '/portfolio/portfolio',
+ data : {
+ user_id : user,
+ specialization_id : id,
+ start: company_map['start']
+ },
+ success : function(data)
+ {
+ if(data['result'].length > 0)
+ {
+ showMarkers(company_map, data['result']);
+ company_map['map'].fitBounds(company_map['bounds']);
+ } else
+ {
+ clearMap(company_map);
+ }
+ },
+ dataType : 'json'
+ }
+ );
+ }
+ );
+ $(document).on('click', '.company_map_time_link', function(e) {
+ e.preventDefault();
+ $('.company_map_time_link').removeClass('active');
+ $(this).addClass('active');
+ company_map['start'] = $(this).data('start');
+ });
+ $(document).on('click', '.main_map_link', function(e) {
+ e.preventDefault();
+ var action = $(this).data('action');
+ $.ajax(
+ {
+ url : '/'+action+'/'+action+'-all',
+ data : {},
+ success : function(data)
+ {
+ if(data['result'].length > 0)
+ {
+ showMarkers(main_map, data['result']);
+ main_map['map'].fitBounds(main_map['bounds']);
+ } else
+ {
+ clearMap(main_map);
+ }
+ },
+ dataType : 'json'
+ }
+ );
+ });
+ }
+);
+function showMarkers(variable, elements)
+{
+ console.log(elements);
+ var position = {
+ lat : undefined,
+ lng : undefined
+ };
+ var color;
+ var title;
+ setMapOnAll(variable['markers'], null);
+ variable['markers'] = [];
+ if(variable['clusterer'] !== undefined)
+ {
+ variable['clusterer'].clearMarkers();
+ }
+ variable['bounds'] = new google.maps.LatLngBounds();
+ for(var i = 0; i < elements.length; i++)
+ {
+ position.lat = parseFloat(elements[i].lat);
+ position.lng = parseFloat(elements[i].lng);
+ title = elements[i].name;
+ if(elements[i].specializations !== null && elements[i].specializations !== undefined) {
+ color = elements[i].specializations[0].background;
+ }
+ icon = variable['icon'];
+ if(color !== null && color !== undefined)
+ {
+ icon.fillColor = color;
+ }
+ marker = new google.maps.Marker(
+ {
+ position : position,
+ title : title,
+ icon : icon
+ }
+ );
+ variable['markers'].push(marker);
+ variable['bounds'].extend(marker.getPosition());
+ }
+ setMapOnAll(variable['markers'], variable['map']);
+ replaceClusterer(variable);
+}
+function clearMap(variable) {
+ setMapOnAll(variable['markers'], null);
+ variable['markers'] = [];
+ if(variable['clusterer'] !== undefined)
+ {
+ variable['clusterer'].clearMarkers();
+ }
+}
+function replaceClusterer(variable)
+{
+ if(variable['clusterer' !== undefined])
+ {
+ variable['clusterer'].clearMarkers();
+ }
+ variable['clusterer'] = new MarkerClusterer(
+ variable['map'], variable['markers'], {
+ maxZoom : 10,
+ gridSize : 100,
+ styles : variable['clusterer_style']
+ }
+ );
+}
+function setMapOnAll(markers, map)
+{
+ for(var i = 0; i < markers.length; i++)
+ {
+ markers[i].setMap(map);
+ }
+}
+function initMap(variable)
+{
+ if(document.getElementById('map_company') == null) {
+ return false;
+ }
+ variable['settings'] = {
+ zoom : 7,
+ scrollwheel : true,
+ maxZoom: 18,
+ center : {
+ "lat" : 50.4501,
+ "lng" : 30.5234
+ },
+ mapTypeControl : false,
+ mapTypeControlOptions : {style : google.maps.MapTypeControlStyle.DROPDOWN_MENU},
+ navigationControl : false,
+ navigationControlOptions : {style : google.maps.NavigationControlStyle.SMALL},
+ scaleControl : false,
+ streetViewControl : false,
+ rotateControl : false,
+ zoomControl : true,
+ mapTypeId : google.maps.MapTypeId.ROADMAP,
+ };
+ variable['map'] = new google.maps.Map(document.getElementById('map_company'), variable['settings']);
+ variable['markers'] = [];
+ variable['clusterer'] = undefined;
+ variable['icon'] = {
+ path : 'M0-48c-9.8 0-17.7 7.8-17.7 17.4 0 15.5 17.7 30.6 17.7 30.6s17.7-15.4 17.7-30.6c0-9.6-7.9-17.4-17.7-17.4z',
+ fillColor : 'white',
+ fillOpacity : 0.8,
+ scale : 0.5
+ };
+ variable['clusterer_style'] = [
+ {
+ url : '/images/markers/clasters.png',
+ height : 36,
+ width : 36
+ }
+ ];
+ variable['bounds'] = new google.maps.LatLngBounds();
+ variable['start'] = $('.company_map_time_link.active').data('start');
+ $.ajax(
+ {
+ url : '/portfolio/portfolio',
+ data : {
+ user_id : $('#map_company').data('user')
+ },
+ success : function(data)
+ {
+ if(data['result'].length > 0)
+ {
+ showMarkers(company_map, data['result']);
+ company_map['map'].fitBounds(company_map['bounds']);
+ } else
+ {
+ clearMap(company_map);
+ }
+ },
+ dataType : 'json'
+ }
+ );
+}
+function initMainMap(variable)
+{
+ if(document.getElementById('map_main') == null) {
+ return false;
+ }
+ variable['settings'] = {
+ zoom : 7,
+ scrollwheel : true,
+ maxZoom: 18,
+ center : {
+ "lat" : 50.4501,
+ "lng" : 30.5234
+ },
+ mapTypeControl : false,
+ mapTypeControlOptions : {style : google.maps.MapTypeControlStyle.DROPDOWN_MENU},
+ navigationControl : false,
+ navigationControlOptions : {style : google.maps.NavigationControlStyle.SMALL},
+ scaleControl : false,
+ streetViewControl : false,
+ rotateControl : false,
+ zoomControl : true,
+ mapTypeId : google.maps.MapTypeId.ROADMAP
+ };
+ variable['map'] = new google.maps.Map(document.getElementById('map_main'), variable['settings']);
+ variable['markers'] = [];
+ variable['clusterer'] = undefined;
+ variable['icon'] = {
+ path : 'M0-48c-9.8 0-17.7 7.8-17.7 17.4 0 15.5 17.7 30.6 17.7 30.6s17.7-15.4 17.7-30.6c0-9.6-7.9-17.4-17.7-17.4z',
+ fillColor : 'white',
+ fillOpacity : 0.8,
+ scale : 0.5
+ };
+ variable['clusterer_style'] = [
+ {
+ url : '/images/markers/clasters.png',
+ height : 36,
+ width : 36
+ }
+ ];
+ variable['bounds'] = new google.maps.LatLngBounds();
+ $.ajax(
+ {
+ url : '/project/project-all',
+ data : {},
+ success : function(data)
+ {
+ if(data['result'].length > 0)
+ {
+ showMarkers(main_map, data['result']);
+ main_map['map'].fitBounds(main_map['bounds']);
+ } else
+ {
+ clearMap(main_map);
+ }
+ },
+ dataType : 'json'
+ }
+ );
+}
\ No newline at end of file
diff --git a/frontend/web/js/no-comprss/script-nocompress.js b/frontend/web/js/no-comprss/script-nocompress.js
index 1582c10..c8f9a21 100755
--- a/frontend/web/js/no-comprss/script-nocompress.js
+++ b/frontend/web/js/no-comprss/script-nocompress.js
@@ -165,23 +165,23 @@ $(document).ready(function(){
});
}
- function newMenuMap(){
- $('.company-performer-map-menu .content-menu-first>li>ul').addClass('content-menu-map-first');
- $('.company-performer-map-menu .content-menu-first>li>ul>li').addClass('content-menu-map-second');
- $('.company-performer-map-menu .content-menu-first>li').addClass('old-content-menu-map-zero');
- $('.company-performer-map-menu .content-menu-map-first').parent().removeClass('old-content-menu-map-zero').addClass('content-menu-map-zero');
- $('.company-performer-map-menu .content-menu-map-zero').click(function(e){
- e.preventDefault();
- });
- $('.company-performer-map-menu .content-menu-map-second, .company-performer-map-menu .old-content-menu-map-zero').click(function(e){
- e.preventDefault()
- $.post("maps/maps.php", function (data) {
- $("#map_cloud").empty();
- $("#map_cloud").append(data);
- initialize();
- });
- });
- }
+// function newMenuMap(){
+// $('.company-performer-map-menu .content-menu-first>li>ul').addClass('content-menu-map-first');
+// $('.company-performer-map-menu .content-menu-first>li>ul>li').addClass('content-menu-map-second');
+// $('.company-performer-map-menu .content-menu-first>li').addClass('old-content-menu-map-zero');
+// $('.company-performer-map-menu .content-menu-map-first').parent().removeClass('old-content-menu-map-zero').addClass('content-menu-map-zero');
+// $('.company-performer-map-menu .content-menu-map-zero').click(function(e){
+// e.preventDefault();
+// });
+// $('.company-performer-map-menu .content-menu-map-second, .company-performer-map-menu .old-content-menu-map-zero').click(function(e){
+// e.preventDefault()
+// $.post("maps/maps.php", function (data) {
+// $("#map_cloud").empty();
+// $("#map_cloud").append(data);
+// initialize();
+// });
+// });
+// }
function projectAllMenu() {
$('.all-project-home-title_menu li').click(function(){
@@ -190,28 +190,27 @@ $(document).ready(function(){
})
}
- function mapLoad(){
- $('.settings-map-ul ul li a').click(function (e) {
- e.preventDefault();
- $('.settings-map-ul ul li a').removeClass('active')
- $(this).addClass('active')
- $.post("maps/maps.php", function (data) {
- $("#map_cloud").empty();
- $("#map_cloud").append(data);
- initialize();
- });
- });
- }
- mapLoadNewMenus()
- function mapLoadNewMenus(){
- $('.all-project-home-title_menu ul li').click(function () {
- $.post("maps/maps.php", function (data) {
- $("#map_cloud").empty();
- $("#map_cloud").append(data);
- initialize();
- });
- });
- }
+// function mapLoad(){
+// $('.settings-map-ul ul li a').click(function (e) {
+// e.preventDefault();
+// $('.settings-map-ul ul li a').removeClass('active')
+// $(this).addClass('active')
+// $.post("maps/maps.php", function (data) {
+// $("#map_cloud").empty();
+// $("#map_cloud").append(data);
+// initialize();
+// });
+// });
+// }
+// mapLoadNewMenus()
+// $('.all-project-home-title_menu ul li').click(function () {
+// $.post("maps/maps.php", function (data) {
+// $("#map_cloud").empty();
+// $("#map_cloud").append(data);
+// initialize();
+// });
+// });
+// }
function federationHome(){
var menu_width = 0;
diff --git a/frontend/web/js/script.js b/frontend/web/js/script.js
index c904077..99a21f2 100755
--- a/frontend/web/js/script.js
+++ b/frontend/web/js/script.js
@@ -11,7 +11,7 @@ $(document).ready(
scrolling();
menuBg();
projectAllMenu();
- mapLoad();
+// mapLoad();
federationHome();
//validationForms();
//menuContent();
@@ -19,7 +19,7 @@ $(document).ready(
box15Height();
formRezume();
fileVal();
- newMenuMap();
+ //newMenuMap();
seeAllComm();
gallerPage();
selectAfter();
@@ -214,33 +214,33 @@ $(document).ready(
);
}
- function newMenuMap()
- {
- $('.company-performer-map-menu .content-menu-first>li>ul').addClass('content-menu-map-first');
- $('.company-performer-map-menu .content-menu-first>li>ul>li').addClass('content-menu-map-second');
- $('.company-performer-map-menu .content-menu-first>li').addClass('old-content-menu-map-zero');
- $('.company-performer-map-menu .content-menu-map-first').parent().removeClass('old-content-menu-map-zero').addClass('content-menu-map-zero');
- $('.company-performer-map-menu .content-menu-map-zero').click(
- function(e)
- {
- e.preventDefault();
- }
- );
- $('.company-performer-map-menu .content-menu-map-second, .company-performer-map-menu .old-content-menu-map-zero').click(
- function(e)
- {
- e.preventDefault()
- $.post(
- "maps/maps.php", function(data)
- {
- $("#map_cloud").empty();
- $("#map_cloud").append(data);
- initialize();
- }
- );
- }
- );
- }
+// function newMenuMap()
+// {
+// $('.company-performer-map-menu .content-menu-first>li>ul').addClass('content-menu-map-first');
+// $('.company-performer-map-menu .content-menu-first>li>ul>li').addClass('content-menu-map-second');
+// $('.company-performer-map-menu .content-menu-first>li').addClass('old-content-menu-map-zero');
+// $('.company-performer-map-menu .content-menu-map-first').parent().removeClass('old-content-menu-map-zero').addClass('content-menu-map-zero');
+// $('.company-performer-map-menu .content-menu-map-zero').click(
+// function(e)
+// {
+// e.preventDefault();
+// }
+// );
+// $('.company-performer-map-menu .content-menu-map-second, .company-performer-map-menu .old-content-menu-map-zero').click(
+// function(e)
+// {
+// e.preventDefault()
+// $.post(
+// "maps/maps.php", function(data)
+// {
+// $("#map_cloud").empty();
+// $("#map_cloud").append(data);
+// initialize();
+// }
+// );
+// }
+// );
+// }
function projectAllMenu()
{
@@ -253,43 +253,43 @@ $(document).ready(
)
}
- function mapLoad()
- {
- $('.settings-map-ul ul li a').click(
- function(e)
- {
- e.preventDefault();
- $('.settings-map-ul ul li a').removeClass('active')
- $(this).addClass('active')
- $.post(
- "maps/maps.php", function(data)
- {
- $("#map_cloud").empty();
- $("#map_cloud").append(data);
- initialize();
- }
- );
- }
- );
- }
-
- mapLoadNewMenus()
- function mapLoadNewMenus()
- {
- $('.all-project-home-title_menu ul li').click(
- function()
- {
- $.post(
- "maps/maps.php", function(data)
- {
- $("#map_cloud").empty();
- $("#map_cloud").append(data);
- initialize();
- }
- );
- }
- );
- }
+// function mapLoad()
+// {
+// $('.settings-map-ul ul li a').click(
+// function(e)
+// {
+// e.preventDefault();
+// $('.settings-map-ul ul li a').removeClass('active')
+// $(this).addClass('active')
+// $.post(
+// "maps/maps.php", function(data)
+// {
+// $("#map_cloud").empty();
+// $("#map_cloud").append(data);
+// initialize();
+// }
+// );
+// }
+// );
+// }
+//
+// mapLoadNewMenus()
+// function mapLoadNewMenus()
+// {
+// $('.all-project-home-title_menu ul li').click(
+// function()
+// {
+// $.post(
+// "maps/maps.php", function(data)
+// {
+// $("#map_cloud").empty();
+// $("#map_cloud").append(data);
+// initialize();
+// }
+// );
+// }
+// );
+// }
function federationHome()
{
--
libgit2 0.21.4