socialsharing de events començat

This commit is contained in:
arnaucode
2017-02-18 16:54:28 +01:00
parent b5f4ee6bc3
commit 65f69551d0
32 changed files with 3298 additions and 78 deletions

View File

@@ -83,6 +83,52 @@
}
/* indigo */
.c_indigo50{
background:#E8EAF6;
color: #000000;
}
.c_indigo100{
background:#C5CAE9;
color: #000000;
}
.c_indigo200{
background:#9FA8DA;
color: #000000;
}
.c_indigo300{
background:#7986CB;
color: #ffffff;
}
.c_indigo400{
background:#5C6BC0;
color: #ffffff;
}
.c_indigo500{
background:#3F51B5;
color: #ffffff;
}
.c_indigo600{
background:#3949AB;
color: #ffffff;
}
.c_indigo700{
background:#303F9F;
color: #ffffff;
}
.c_indigo800{
background:#283593;
color: #ffffff;
}
.c_indigo900{
background:#1A237E;
color: #ffffff;
}
.ct_indigo500{
color: #3F51B5!important;
}
/* green */
.c_green50{
background: #E8F5E9;
@@ -208,46 +254,3 @@
background: #E65100;
color: #ffffff;
}
/* indigo */
.c_indigo50{
background:#E8EAF6;
color: #000000;
}
.c_indigo100{
background:#C5CAE9;
color: #000000;
}
.c_indigo200{
background:#9FA8DA;
color: #000000;
}
.c_indigo300{
background:#7986CB;
color: #ffffff;
}
.c_indigo400{
background:#5C6BC0;
color: #ffffff;
}
.c_indigo500{
background:#3F51B5;
color: #ffffff;
}
.c_indigo600{
background:#3949AB;
color: #ffffff;
}
.c_indigo700{
background:#303F9F;
color: #ffffff;
}
.c_indigo800{
background:#283593;
color: #ffffff;
}
.c_indigo900{
background:#1A237E;
color: #ffffff;
}

View File

@@ -28,6 +28,7 @@
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="cordova.js"></script>
<!-- openstreetmaps angular - leaflet -->

View File

@@ -1,9 +1,12 @@
var urlapi = "http://localhost:3000/api/";
//var urlapi = "http://localhost:3000/api/";
var urlapi = "http://192.168.1.35:3000/api/";
angular.module('app', [
'ionic',
'pascalprecht.translate',
'ngCordova',
'app.menu',
'app.main',
'app.events',

View File

@@ -2,7 +2,7 @@ angular.module('app.event', ['pascalprecht.translate', 'ui-leaflet'])
.controller('EventCtrl', function($scope, $http, $ionicModal,
$stateParams, $timeout, $ionicLoading, $filter,
leafletData, leafletBoundsHelpers) {
leafletData, leafletBoundsHelpers, $cordovaSocialSharing) {
$scope.center= {
@@ -54,4 +54,18 @@ angular.module('app.event', ['pascalprecht.translate', 'ui-leaflet'])
};
$scope.doRefresh();
$scope.share = function(){
var message = "hola, això ho comparteixo";
var subject = 'compartició';
var file= ['',''];
var link = "http://duckduckgo.com";
$cordovaSocialSharing
.share(message, subject, file, link) // Share via native share sheet
.then(function(result) {
// Success!
}, function(err) {
// An error occured. Show a message to the user
});
};
});

View File

@@ -1,24 +1,26 @@
<ion-view view-title="Event">
<ion-content>
<a class="item item-avatar" ng-href="#/app/users/{{event.user._id}}">
<img ng-src="{{event.user.img}}">
<h2>{{event.user.username}}</h2>
<p>{{event.user.description}}</p>
<a class="item item-avatar" ng-href="#/app/users/{{event.user._id}}">
<img ng-src="{{event.user.img}}">
<h2>{{event.user.username}}</h2>
<p>{{event.user.description}}</p>
</a>
<a class="item">
<h2>{{event.title}}</h2>
<p>{{event.description}}</p>
<p>{{event.date | date: 'HH:mm, dd/MM/yyyy'}}</p>
</a>
<div class="item item-image">
<img ng-src="{{event.img}}">
</div>
<div class="item item-image">
<img ng-src="{{event.img}}">
</div>
<div class="item">
<h2>{{event.title}}</h2>
<p>{{event.description}}</p>
<p>{{event.date | date: 'HH:mm, dd/MM/yyyy'}}</p>
</div>
<div class="item">
<h2>Map</h2>
<h2>Map</h2>
</div>
<leaflet width="100%" height="40%" markers="markers" center="center" tiles="tiles" id="map-simple-map"></leaflet>
<a class="item item-icon-left ct_indigo500" ng-click="share()">
<i class="icon ion-android-share-alt"></i> Share
</a>
</ion-content>
</ion-view>