├── README.md ├── api └── local.php ├── appinfo ├── app.php ├── application.php ├── database.xml ├── info.xml └── routes.php ├── controller ├── helpercontroller.php ├── pagecontroller.php ├── photocontroller.php ├── pincontroller.php ├── pinwallcontroller.php ├── publiccontroller.php ├── sharecontroller.php └── tagscontroller.php ├── css ├── 3rdparty │ ├── MarkerCluster.Default.css │ ├── MarkerCluster.Default.ie.css │ ├── MarkerCluster.css │ ├── bootstrap.css │ ├── fontello │ │ ├── LICENSE.txt │ │ ├── README.txt │ │ ├── config.json │ │ ├── css │ │ │ ├── animation.css │ │ │ ├── fontello-codes.css │ │ │ ├── fontello-embedded.css │ │ │ ├── fontello-ie7-codes.css │ │ │ ├── fontello-ie7.css │ │ │ └── fontello.css │ │ ├── demo.html │ │ └── font │ │ │ ├── fontello.eot │ │ │ ├── fontello.svg │ │ │ ├── fontello.ttf │ │ │ └── fontello.woff │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── images │ │ ├── layers-2x.png │ │ ├── layers.png │ │ ├── marker-icon-2x.png │ │ ├── marker-icon.png │ │ ├── marker-shadow.png │ │ ├── markers-matte.png │ │ ├── markers-matte@2x.png │ │ ├── markers-plain.png │ │ ├── markers-shadow.png │ │ ├── markers-shadow@2x.png │ │ ├── markers-soft.png │ │ └── markers-soft@2x.png │ ├── jquery.tagit.css │ ├── leaflet.awesome-markers.css │ └── leaflet.css ├── jquery.Jcrop.css ├── mobile.css ├── public.css └── style.css ├── db ├── pindao.php └── pinwalldao.php ├── img ├── ArrowLeft.svg ├── ArrowRight.svg ├── Jcrop.gif ├── bg │ ├── edel-light.png │ ├── edel.jpg │ ├── green_cup.png │ ├── grey.jpg │ ├── restaurant.png │ ├── skulls.png │ ├── wall-dark.jpg │ └── wood.png ├── blank.gif ├── contacts.png ├── contacts.svg ├── magnifier.svg ├── marker.png ├── media.png ├── move.svg ├── new-red.png ├── pinit.png ├── pinit.svg ├── pins │ ├── blue.png │ ├── green.png │ ├── pins.psd │ ├── red.png │ └── yellow.png ├── play.png └── ui-bg_diagonals-thick_20_666666_40x40.png ├── js ├── 3rdparty │ ├── Leaflet.EdgeMarker.js │ ├── gridify.js │ ├── images │ │ ├── layers-2x.png │ │ ├── layers.png │ │ ├── marker-icon-2x.png │ │ ├── marker-icon.png │ │ └── marker-shadow.png │ ├── leaflet-src.js │ ├── leaflet.awesome-markers.js │ ├── leaflet.js │ ├── leaflet.markercluster-src.js │ └── tag-it.js ├── jquery.Jcrop.js ├── jquery.Jcrop.min.js ├── jquery.scrollTo.js ├── pinit.js └── public.js ├── l10n ├── de.php ├── de_DE.js ├── de_DE.json └── de_DE.php ├── lib └── webthumbnail.php ├── public.php ├── search ├── pinit.php └── provider.php └── templates ├── index.php ├── part.cropphoto.php ├── pin.edit.php ├── pin.new.php ├── pin.show.php └── public.php /README.md: -------------------------------------------------------------------------------- 1 | Visual, social bookmarks App 2 | ============= 3 | 4 | Maintainer: 5 | =========== 6 | Sebastian Döll 7 | 8 | Version Info: 9 | ============ 10 | 1.0.2 11 | 12 | Setup Info: 13 | =========== 14 | Apache + Mysql 15 | php 5.4 16 | This version of the bookmarks app is only compatible with upcoming ownCloud Version 8.1 or later! 17 | Tested with browser: Firefox, Safari, Chrome, IE 11 18 | 19 | 20 | Installation: 21 | ============= 22 | Download the zip file and rename folder from pinit-master to pinit! Upload the app to your apps directory and activate it on the apps settings page! 23 | 24 | 25 | 26 | Special thanks to 27 | ===================== 28 | 29 | khanhnh for file gridify.js, small and perfect 30 | 31 | Matthew Hailwood for tag-it.js all we need to tag 32 | 33 | Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com 34 | 35 | (c) 2010-2013, Vladimir Agafonkin 36 | 37 | (c) 2010-2011, CloudMade 38 | 39 | 40 | 41 | 42 | 43 | Pinit Version 1.0.1 44 | ===================== 45 | 46 | Beschreibung 47 | ================ 48 | Mit dieser App kann man seine Bookmarks organisieren, man kann interessante Links mit anderen teilen, man kann aber einfach nur Bilder hochladen und diese dann auf der Map darstellen! Ein Benutzer kann beliebig viele Pinnwände erstellen und so seine Pins organisieren. In der Zusammenfassung ist diese App eine Mischung aus Pinterest.com, Visual Bookmarks, Social Bookmarks und Geomapping von Bildern! 49 | 50 | Technisches 51 | =========== 52 | Legt man einen neuen Pin an, hat man viele Möglichkeiten: 53 | 54 | 1. man kann ein Bild hochladen, wenn GPS oder IPTC Daten vorhanden sind, werden diese mit ausgelesen und angezeigt, sprich Longitude und Latitude 55 | 56 | 2. Man kann einfach eine Adresse (Straße,Plz,Ort,Land) eingeben auf das Plus rechts klicken und es werden die GEO Daten von dem Service Openstreetmap ausgelesen und angezeigt. 57 | 58 | 3. Man kann einfach einen Link angeben und die Metadaten auslesen, falls vorhanden, hierfür werden die Opengraph Daten hergenommen, diese verwendet auch Facebook wenn Artikel verlinkt werden, dafür muss man "MetaInfo" auswählen und nur rechts auf das Plus zeichen klicken ! 59 | Oder man wählt "Screenshot" aus und es wird ein Screenshot der Webseite mit Hilfe des Services von webthumbnails.org erstellt! 60 | Oder man wählt "Picture" aus und kann dann einen direkten Link zu einem Bild im Internet angeben und dieser wird dann automatisch hochgeladen! Danach einfach nur noch einen Titel für den Pin angeben und fertig! 61 | 62 | Sind Geodaten (Longitude, Latitude) gefunden worden, kann man nun noch die Marker Farbe und Marker Motiv für die Map auswählen! 63 | 64 | Aber man kann einfach nur einen Titel und Link angeben und es wird ein Visual Bookmark erzeugt! 65 | 66 | Das Beste an dieser App, man kann Pinnwände auch mit andern Usern, Gruppen oder per Link mit der Öffentlichkeit teilen, so gibt es sehr viele Anwendungsmöglichkeiten! Man kann zum Beispiel die besten Plätze seiner Stadt fotografieren und diese dann auf der Map darstellen, oder seinen Urlaub mit Fotos und Orten auf der Map markieren, oder die besten Clubs, Bars etc mit seinen Freunden und Bekannten teilen! 67 | 68 | english description follows !! 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /api/local.php: -------------------------------------------------------------------------------- 1 | . 20 | * 21 | */ 22 | 23 | namespace OCA\Pinit\API; 24 | 25 | class Local { 26 | 27 | /** 28 | * get all shares 29 | * 30 | * @param array $params option 'file' to limit the result to a specific file/folder 31 | * @return \OC_OCS_Result share information 32 | */ 33 | 34 | private static $sItems = array(); 35 | const ITEM_TYPE = 'pinwall'; 36 | 37 | public static function getAllShares($params) { 38 | if (isset($_GET['shared_with_me']) && $_GET['shared_with_me'] !== 'false') { 39 | return self::getItemsSharedWithMe(); 40 | } 41 | //Show all reshared options 42 | $bReshare=false; 43 | if(isset($_GET['reshares']) && $_GET['reshares'] === 'true'){ 44 | $bReshare=true; 45 | } 46 | 47 | $shares = \OCP\Share::getItemShared(self::ITEM_TYPE, null); 48 | 49 | if ($shares === false) { 50 | return new \OC_OCS_Result(null, 404, 'could not get shares'); 51 | } else { 52 | $reshares=array(); 53 | foreach ($shares as &$share) { 54 | if($bReshare === true){ 55 | self::checkReShare($share['item_source']); 56 | } 57 | } 58 | 59 | if(count(self::$sItems)>0){ 60 | $shares=array_merge($shares, self::$sItems); 61 | } 62 | 63 | return new \OC_OCS_Result($shares); 64 | } 65 | 66 | } 67 | /** 68 | * resolves reshares down to the last real share 69 | * @param array $linkItem 70 | * @return array file owner 71 | */ 72 | public static function checkReShare($itemsource){ 73 | 74 | 75 | $getReshares = \OCP\DB::prepare("SELECT * FROM `*PREFIX*share` WHERE `item_source` = ? AND `uid_owner` != ? AND `item_type` = ? AND `parent` != 'NULL' "); 76 | $items = $getReshares->execute(array($itemsource, \OCP\User::getUser(), self::ITEM_TYPE))->fetchAll(); 77 | 78 | foreach($items as $reshare){ 79 | $reshare['share_type'] = (int) $reshare['share_type']; 80 | 81 | if (isset($reshare['share_with']) && $reshare['share_with'] !== '') { 82 | $reshare['share_with_displayname'] = \OCP\User::getDisplayName($reshare['share_with']); 83 | } 84 | self::$sItems[$reshare['id']]=$reshare; 85 | } 86 | 87 | } 88 | 89 | /** 90 | * get share information for a given share 91 | * 92 | * @param array $params which contains a 'id' 93 | * @return \OC_OCS_Result share information 94 | */ 95 | public static function getShare($params) { 96 | 97 | $s = self::getShareFromId($params['id']); 98 | //Show all reshared options 99 | $bReshare=false; 100 | if(isset($_GET['reshares']) && $_GET['reshares'] === 'true'){ 101 | $bReshare=true; 102 | } 103 | $params['itemSource'] = $s['item_source']; 104 | $params['itemType'] = $s['item_type']; 105 | $params['itemTarget'] = $s['item_target']; 106 | $params['specificShare'] = true; 107 | $params['reshare']=$bReshare; 108 | 109 | return self::collectShares($params); 110 | } 111 | 112 | /** 113 | * collect all share information, either of a specific share or all 114 | * shares for a given path 115 | * @param array $params 116 | * @return \OC_OCS_Result 117 | */ 118 | private static function collectShares($params) { 119 | 120 | $itemSource = $params['itemSource']; 121 | $itemType = $params['itemType']; 122 | $getSpecificShare = isset($params['specificShare']) ? $params['specificShare'] : false; 123 | 124 | if ($itemSource !== null) { 125 | $shares = \OCP\Share::getItemShared($itemType, $itemSource); 126 | $receivedFrom = \OCP\Share::getItemSharedWithBySource($itemType, $itemSource); 127 | // if a specific share was specified only return this one 128 | if ($getSpecificShare === true) { 129 | //$shareEE=array(); 130 | foreach ($shares as $share) { 131 | if ($share['id'] === (int) $params['id']) { 132 | 133 | $shareEE[] = $share; 134 | 135 | break; 136 | } 137 | } 138 | 139 | if($params['reshare'] === true){ 140 | self::checkReShare($itemSource,$itemType); 141 | 142 | if(count(self::$sItems)>0){ 143 | $shares=array_merge($shareEE, self::$sItems); 144 | } 145 | } 146 | 147 | } 148 | 149 | if ($receivedFrom) { 150 | foreach ($shares as $key => $share) { 151 | $shares[$key]['received_from'] = $receivedFrom['uid_owner']; 152 | $shares[$key]['received_from_displayname'] = \OCP\User::getDisplayName($receivedFrom['uid_owner']); 153 | } 154 | } 155 | } else { 156 | $shares = null; 157 | } 158 | 159 | if ($shares === null || empty($shares)) { 160 | return new \OC_OCS_Result(null, 404, 'share doesn\'t exist'); 161 | } else { 162 | return new \OC_OCS_Result($shares); 163 | } 164 | } 165 | 166 | /** 167 | * get files shared with the user 168 | * @return \OC_OCS_Result 169 | */ 170 | private static function getItemsSharedWithMe() { 171 | try { 172 | $shares = \OCP\Share::getItemsSharedWith(self::ITEM_TYPE); 173 | 174 | $result = new \OC_OCS_Result($shares); 175 | } catch (\Exception $e) { 176 | $result = new \OC_OCS_Result(null, 403, $e->getMessage()); 177 | } 178 | 179 | return $result; 180 | 181 | } 182 | 183 | 184 | /** 185 | * get some information from a given share 186 | * @param int $shareID 187 | * @return array with: item_source, share_type, share_with, item_type, permissions 188 | */ 189 | private static function getShareFromId($shareID) { 190 | $sql = 'SELECT `id`,`item_source`, `share_type`, `share_with`, `item_type`, `item_target`, `permissions`, `stime` FROM `*PREFIX*share` WHERE `id` = ? AND `item_type` = ?'; 191 | $args = array($shareID,self::ITEM_TYPE); 192 | $query = \OCP\DB::prepare($sql); 193 | $result = $query->execute($args); 194 | 195 | if (\OCP\DB::isError($result)) { 196 | \OCP\Util::writeLog('pinit', \OCP\DB::getErrorMessage($result), \OCP\Util::ERROR); 197 | return null; 198 | } 199 | if ($share = $result->fetchRow()) { 200 | 201 | 202 | return $share; 203 | } 204 | 205 | return null; 206 | 207 | } 208 | 209 | } 210 | -------------------------------------------------------------------------------- /appinfo/app.php: -------------------------------------------------------------------------------- 1 | . 20 | * 21 | */ 22 | 23 | namespace OCA\Pinit\AppInfo; 24 | 25 | $app = new Application(); 26 | $c = $app->getContainer(); 27 | 28 | // add an navigation entry 29 | $navigationEntry = function () use ($c) { 30 | return [ 31 | 'id' => $c->getAppName(), 32 | 'order' => 10, 33 | 'name' => $c->query('L10N')->t('Pinit'), 34 | 'href' => $c->query('URLGenerator')->linkToRoute('pinit.page.index'), 35 | 'icon' => $c->query('URLGenerator')->imagePath('pinit', 'pinit.svg'), 36 | ]; 37 | }; 38 | 39 | $c->getServer()->getNavigationManager()->add($navigationEntry); 40 | 41 | \OCP\Share::registerBackend('pinwall', '\OCA\Pinit\Controller\ShareController'); 42 | //upcoming version search for 8.2 perhaps patch https://github.com/owncloud/core/pull/17339/files 43 | \OC::$server->getSearch()->registerProvider('OCA\Pinit\Search\Provider', array('app' => 'pinit')); 44 | 45 | -------------------------------------------------------------------------------- /appinfo/application.php: -------------------------------------------------------------------------------- 1 | . 20 | * 21 | */ 22 | 23 | namespace OCA\Pinit\AppInfo; 24 | 25 | use OC\AppFramework\Utility\SimpleContainer; 26 | use \OCP\AppFramework\App; 27 | use \OCP\Share; 28 | use \OCP\IContainer; 29 | use OCP\AppFramework\IAppContainer; 30 | 31 | use \OCA\Pinit\Controller\PinController; 32 | use \OCA\Pinit\Controller\PinWallController; 33 | use \OCA\Pinit\Controller\PageController; 34 | use \OCA\Pinit\Controller\HelperController; 35 | use \OCA\Pinit\Controller\PhotoController; 36 | use \OCA\Pinit\Controller\TagsController; 37 | use \OCA\Pinit\Controller\PublicController; 38 | use \OCA\Pinit\Db\PinDAO; 39 | use \OCA\Pinit\Db\PinWallDAO; 40 | 41 | 42 | 43 | class Application extends App { 44 | 45 | public function __construct (array $urlParams=array()) { 46 | 47 | parent::__construct('pinit', $urlParams); 48 | $container = $this->getContainer(); 49 | 50 | 51 | $container->registerService('PageController', function(IContainer $c) { 52 | return new PageController( 53 | $c->query('AppName'), 54 | $c->query('Request'), 55 | $c->query('HelperController'), 56 | $c->query('UserId'), 57 | $c->query('L10N'), 58 | $c->query('PinDAO') 59 | ); 60 | }); 61 | 62 | $container->registerService('PublicController', function(IContainer $c) { 63 | return new PublicController( 64 | $c->query('AppName'), 65 | $c->query('Request'), 66 | $c->query('PinWallController'), 67 | $c->query('L10N'), 68 | $c->query('Session'), 69 | $c->query('OCP\AppFramework\Utility\IControllerMethodReflector'), 70 | $c->query('ServerContainer')->getURLGenerator() 71 | ); 72 | }); 73 | 74 | $container->registerService('PinController', function(IContainer $c) { 75 | return new PinController( 76 | $c->query('AppName'), 77 | $c->query('Request'), 78 | $c->query('UserId'), 79 | $c->query('PinDAO'), 80 | $c->query('HelperController'), 81 | $c->query('PinWallController'), 82 | $c->query('L10N') 83 | ); 84 | }); 85 | $container->registerService('PinWallController', function(IContainer $c) { 86 | return new PinWallController( 87 | $c->query('AppName'), 88 | $c->query('Request'), 89 | $c->query('UserId'), 90 | $c->query('PinDAO'), 91 | $c->query('PinWallDAO'), 92 | $c->query('HelperController'), 93 | $c->query('L10N') 94 | ); 95 | }); 96 | 97 | $container->registerService('HelperController', function(IContainer $c) { 98 | return new HelperController( 99 | $c->query('AppName'), 100 | $c->query('Request'), 101 | $c->query('L10N') 102 | ); 103 | }); 104 | 105 | $container->registerService('TagsController', function(IContainer $c) { 106 | return new TagsController( 107 | $c->query('AppName'), 108 | $c->query('Request'), 109 | $c->query('PinDAO'), 110 | $c->query('PinWallDAO'), 111 | $c->query('HelperController'), 112 | $c->query('L10N') 113 | ); 114 | }); 115 | 116 | $container->registerService('PhotoController', function(IContainer $c) { 117 | return new PhotoController( 118 | $c->query('AppName'), 119 | $c->query('Request'), 120 | $c->query('HelperController'), 121 | $c->query('L10N') 122 | ); 123 | }); 124 | 125 | 126 | 127 | /** 128 | * Database Layer 129 | */ 130 | $container->registerService('PinDAO', function(IContainer $c) { 131 | return new PinDAO( 132 | $c->query('ServerContainer')->getDb(), 133 | $c->query('UserId'), 134 | $c->query('PinWallDAO'), 135 | $c->query('L10N') 136 | ); 137 | }); 138 | 139 | $container->registerService('PinWallDAO', function(IContainer $c) { 140 | return new PinWallDAO( 141 | $c->query('ServerContainer')->getDb() 142 | 143 | ); 144 | }); 145 | 146 | /** 147 | * Core 148 | */ 149 | $container -> registerService('UserId', function(IContainer $c) { 150 | return \OCP\User::getUser(); 151 | }); 152 | 153 | $container->registerService('URLGenerator', function(IContainer $c) { 154 | /** @var \OC\Server $server */ 155 | $server = $c->query('ServerContainer'); 156 | return $server->getURLGenerator(); 157 | }); 158 | 159 | $container -> registerService('L10N', function(IContainer $c) { 160 | return $c -> query('ServerContainer') -> getL10N($c -> query('AppName')); 161 | }); 162 | 163 | $container->registerService('Session', function (IAppContainer $c) { 164 | return $c->getServer() 165 | ->getSession(); 166 | } 167 | ); 168 | $container->registerService('Token', function (IContainer $c) { 169 | return $c->query('Request') ->getParam('token'); 170 | } 171 | ); 172 | 173 | //$this->registerProviders(); 174 | } 175 | 176 | public function registerProviders() { 177 | Share::registerBackend('pinwall', '\OCA\Pinit\Controller\ShareController'); 178 | 179 | } 180 | 181 | } 182 | 183 | -------------------------------------------------------------------------------- /appinfo/database.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | *dbname* 4 | true 5 | false 6 | utf8 7 | 8 | *dbprefix*pinit_pins 9 | 10 | 11 | id 12 | integer 13 | 1 14 | 0 15 | true 16 | 4 17 | 18 | 19 | wall_id 20 | integer 21 | 0 22 | true 23 | 4 24 | 25 | 26 | url 27 | text 28 | 29 | true 30 | 4096 31 | 32 | 33 | title 34 | text 35 | 36 | true 37 | 140 38 | 39 | 40 | location 41 | text 42 | 43 | true 44 | 250 45 | 46 | 47 | image 48 | clob 49 | false 50 | 51 | 52 | user_id 53 | text 54 | 55 | true 56 | 64 57 | 58 | 59 | description 60 | text 61 | 62 | true 63 | 4096 64 | 65 | 66 | pincolor_id 67 | integer 68 | 0 69 | 1 70 | 71 | 72 | public 73 | integer 74 | 0 75 | 1 76 | 77 | 78 | added 79 | integer 80 | 81 | false 82 | true 83 | 4 84 | 85 | 86 | lastmodified 87 | integer 88 | 89 | false 90 | true 91 | 4 92 | 93 | 94 | clickcount 95 | integer 96 | 0 97 | true 98 | true 99 | 4 100 | 101 | 102 | categories 103 | text 104 | 105 | true 106 | 200 107 | 108 | 109 | lon 110 | text 111 | 112 | true 113 | 20 114 | 115 | 116 | lat 117 | text 118 | 119 | true 120 | 20 121 | 122 | 123 | icon 124 | text 125 | 126 | true 127 | 20 128 | 129 | 130 | markercolor 131 | text 132 | 133 | true 134 | 20 135 | 136 | 137 | media_url 138 | text 139 | 140 | true 141 | 250 142 | 143 | 144 | media_sitename 145 | text 146 | 147 | true 148 | 100 149 | 150 | 151 | media_width 152 | text 153 | 154 | true 155 | 5 156 | 157 | 158 | media_height 159 | text 160 | 161 | true 162 | 5 163 | 164 | 165 |
166 | 167 | 168 | *dbprefix*pinit_walls 169 | 170 | 171 | id 172 | integer 173 | 1 174 | 0 175 | true 176 | 4 177 | 178 | 179 | user_id 180 | text 181 | 182 | true 183 | 64 184 | 185 | 186 | displayname 187 | text 188 | 189 | true 190 | 100 191 | 192 | 193 | active 194 | integer 195 | 1 196 | 1 197 | 198 | 199 | wallorder 200 | integer 201 | 0 202 | 2 203 | 204 | 205 | wallbackground 206 | integer 207 | 0 208 | 2 209 | 210 | 211 | lastmodifieddate 212 | integer 213 | 214 | false 215 | true 216 | 4 217 | 218 | 219 |
220 |
221 | 222 | -------------------------------------------------------------------------------- /appinfo/info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | pinit 4 | Pinit 5 | AGPL 6 | Döll Sebastian 7 | Pinit, with this app you can create easy social, visual and map bookmarks, Share your Pins with other users or for public! 8 | Pinit 9 | https://github.com/libasys/pinit 10 | 1.0.2 11 | multimedia 12 | 13 | public.php 14 | 15 | 16 | 17 | 18 | 19 | 170592 20 | -------------------------------------------------------------------------------- /appinfo/routes.php: -------------------------------------------------------------------------------- 1 | . 20 | * 21 | */ 22 | 23 | namespace OCA\Pinit; 24 | 25 | 26 | use \OCA\Pinit\AppInfo\Application; 27 | 28 | $application = new Application(); 29 | 30 | $application->registerRoutes($this, ['routes' => [ 31 | ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'], 32 | ['name' => 'public#index', 'url' => '/s/{token}', 'verb' => 'GET'], 33 | ['name' => 'public#index','url' => '/s/{token}', 'verb' => 'POST', 'postfix' => 'auth'], 34 | ['name' => 'pin#getPins', 'url' => '/pins', 'verb' => 'GET'], 35 | ['name' => 'pin#getPin', 'url' => '/pin', 'verb' => 'GET'], 36 | ['name' => 'pin#getPinsPublic', 'url' => '/pinspublic', 'verb' => 'GET'], 37 | ['name' => 'pin#getAllPinsUser', 'url' => '/getallpinsuser', 'verb' => 'GET'], 38 | ['name' => 'pin#showPin', 'url' => '/showpin', 'verb' => 'POST'], 39 | ['name' => 'pin#showPinPublic', 'url' => '/showpinpublic', 'verb' => 'POST'], 40 | ['name' => 'pin#newPin', 'url' => '/newpin', 'verb' => 'POST'], 41 | ['name' => 'pin#newPinSave', 'url' => '/newpinsave', 'verb' => 'POST'], 42 | ['name' => 'pin#editPin', 'url' => '/editpin', 'verb' => 'POST'], 43 | ['name' => 'pin#editPinSave', 'url' => '/editpinsave', 'verb' => 'POST'], 44 | ['name' => 'pin#deletePin', 'url' => '/deletepin', 'verb' => 'POST'], 45 | ['name' => 'pin#deletePhotoPin', 'url' => '/deletephotopin', 'verb' => 'GET'], 46 | ['name' => 'pin#movePin', 'url' => '/movepin', 'verb' => 'GET'], 47 | ['name' => 'pin#addCategoryToPin', 'url' => '/addcategorytopin', 'verb' => 'GET'], 48 | ['name' => 'pin#getLonLatFromAddress', 'url' => '/lonlataddresspin', 'verb' => 'GET'], 49 | ['name' => 'pin#getWebsiteInfo', 'url' => '/getwebsiteinfopin', 'verb' => 'GET'], 50 | ['name' => 'pin#changePinStatus', 'url' => '/changepinstatus', 'verb' => 'GET'], 51 | ['name' => 'pinWall#getPinWalls', 'url' => '/pinwalls', 'verb' => 'GET'], 52 | ['name' => 'pinWall#newPinWall', 'url' => '/newpinwall', 'verb' => 'GET'], 53 | ['name' => 'pinWall#editPinWall', 'url' => '/editpinwall', 'verb' => 'GET'], 54 | ['name' => 'pinWall#deletePinWall', 'url' => '/deletepinwall', 'verb' => 'GET'], 55 | ['name' => 'pinWall#getPinWallBackground', 'url' => '/getpinwallbg', 'verb' => 'GET'], 56 | ['name' => 'pinWall#saveSortOrderPinwall', 'url' => '/savesortorderpinwall', 'verb' => 'GET'], 57 | ['name' => 'photo#getImageFromCloud', 'url' => '/getimagefromcloud', 'verb' => 'GET'], 58 | ['name' => 'photo#cropPhoto', 'url' => '/cropphoto', 'verb' => 'POST'], 59 | ['name' => 'photo#saveCropPhoto', 'url' => '/savecropphoto', 'verb' => 'POST'], 60 | ['name' => 'photo#uploadPhoto', 'url' => '/uploadphoto', 'verb' => 'POST'], 61 | ['name' => 'photo#clearPhotoCache', 'url' => '/clearphotocache', 'verb' => 'POST'], 62 | ['name' => 'tags#addTag', 'url' => '/addtag', 'verb' => 'GET'], 63 | ['name' => 'tags#deleteTag', 'url' => '/deletetag', 'verb' => 'GET'], 64 | ['name' => 'tags#loadTags', 'url' => '/loadtags', 'verb' => 'GET'], 65 | ]]); 66 | 67 | \OCP\API::register('get', 68 | '/apps/pinit/api/v1/shares', 69 | array('\OCA\Pinit\API\Local', 'getAllShares'), 70 | 'pinit'); 71 | \OCP\API::register('get', 72 | '/apps/pinit/api/v1/shares/{id}', 73 | array('\OCA\Pinit\API\Local', 'getShare'), 74 | 'pinit'); 75 | 76 | 77 | -------------------------------------------------------------------------------- /controller/pagecontroller.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | namespace OCA\Pinit\Controller; 25 | 26 | use \OCP\AppFramework\Controller; 27 | use \OCP\AppFramework\Http\TemplateResponse; 28 | use \OCP\IRequest; 29 | use \OCP\IL10N; 30 | /** 31 | * Controller class for main page. 32 | */ 33 | class PageController extends Controller { 34 | 35 | private $userId; 36 | private $pinDAO; 37 | private $l10n; 38 | private $helperController; 39 | 40 | 41 | public function __construct($appName, IRequest $request, $helperController, $userId, IL10N $l10n, $pinDAO) { 42 | parent::__construct($appName, $request); 43 | $this -> userId = $userId; 44 | $this->l10n = $l10n; 45 | $this->helperController = $helperController; 46 | $this->pinDAO = $pinDAO; 47 | 48 | } 49 | 50 | public function getLanguageCode() { 51 | return $this->l10n->getLanguageCode(); 52 | } 53 | 54 | /** 55 | * @NoAdminRequired 56 | * @NoCSRFRequired 57 | */ 58 | public function index() { 59 | 60 | 61 | $maxUploadFilesize = \OCP\Util::maxUploadFilesize('/'); 62 | 63 | $aPinColors=$this->helperController->getPinColorOptions(); 64 | $config = \OC::$server->getConfig(); 65 | 66 | $csp = new \OCP\AppFramework\Http\ContentSecurityPolicy(); 67 | $csp->addAllowedImageDomain('*'); 68 | $csp->addAllowedMediaDomain('*'); 69 | $csp->addAllowedFrameDomain('*'); 70 | 71 | /* 72 | $iPins = 70; 73 | 74 | for($i = 0; $i < $iPins; $i++){ 75 | $saveArray=[ 76 | 'pname' => 'counter-'.$i, 77 | 'wall_id' => 2 78 | ]; 79 | $this->pinDAO->save($saveArray); 80 | }*/ 81 | 82 | $response = new TemplateResponse('pinit', 'index'); 83 | $response->setContentSecurityPolicy($csp); 84 | $response->setParams(array( 85 | 'uploadMaxFilesize' => $maxUploadFilesize, 86 | 'uploadMaxHumanFilesize' => \OCP\Util::humanFileSize($maxUploadFilesize), 87 | 'aPinColors' => $aPinColors, 88 | 'allowShareWithLink' => $config->getAppValue('core', 'shareapi_allow_links', 'yes'), 89 | 'mailNotificationEnabled' => $config->getAppValue('core', 'shareapi_allow_mail_notification', 'no'), 90 | 'mailPublicNotificationEnabled' => $config->getAppValue('core', 'shareapi_allow_public_notification', 'no'), 91 | 92 | )); 93 | 94 | return $response; 95 | } 96 | } -------------------------------------------------------------------------------- /controller/photocontroller.php: -------------------------------------------------------------------------------- 1 | . 20 | * 21 | */ 22 | 23 | namespace OCA\Pinit\Controller; 24 | 25 | use \OCP\AppFramework\Controller; 26 | use \OCP\AppFramework\Http\JSONResponse; 27 | use \OCP\AppFramework\Http\TemplateResponse; 28 | use \OCP\IRequest; 29 | 30 | class PhotoController extends Controller { 31 | 32 | private $l10n; 33 | private $helperController; 34 | public function __construct($appName, IRequest $request, $helperController, $l10n) { 35 | parent::__construct($appName, $request); 36 | 37 | $this->l10n = $l10n; 38 | $this->helperController = $helperController; 39 | 40 | } 41 | 42 | /** 43 | * @NoAdminRequired 44 | */ 45 | 46 | public function cropPhoto(){ 47 | 48 | $id = $this -> params('id'); 49 | $tmpkey = $this -> params('tmpkey'); 50 | 51 | $params=array( 52 | 'tmpkey' => $tmpkey, 53 | 'id' => $id, 54 | ); 55 | $csp = new \OCP\AppFramework\Http\ContentSecurityPolicy(); 56 | $csp->addAllowedImageDomain('data:'); 57 | 58 | $response = new TemplateResponse('pinit', 'part.cropphoto', $params, ''); 59 | $response->setContentSecurityPolicy($csp); 60 | 61 | return $response; 62 | } 63 | 64 | /** 65 | * @NoAdminRequired 66 | */ 67 | 68 | public function clearPhotoCache(){ 69 | //$id = $this -> params('id'); 70 | $tmpkey = $this -> params('tmpkey'); 71 | $data = \OC::$server->getCache()->get($tmpkey); 72 | //\OCP\Util::writeLog('pinit','cleared.'.$tmpkey,\OCP\Util::DEBUG); 73 | if($data) { 74 | 75 | \OC::$server->getCache()->remove($tmpkey); 76 | } 77 | } 78 | 79 | /** 80 | * @NoAdminRequired 81 | */ 82 | public function saveCropPhoto(){ 83 | $id = $this -> params('id'); 84 | $tmpkey = $this -> params('tmpkey'); 85 | $x = $this -> params('x1', 0); 86 | $y = $this -> params('y1', 0); 87 | $w = $this -> params('w', -1); 88 | $h = $this -> params('h', -1); 89 | 90 | $image = null; 91 | 92 | 93 | 94 | //\OCP\Util::writeLog('pinit','CROPDATA:'.$x.':'.$y,\OCP\Util::DEBUG); 95 | 96 | $data = \OC::$server->getCache()->get($tmpkey); 97 | if($data) { 98 | $image = new \OCP\Image(); 99 | if($image->loadFromdata($data)) { 100 | $w = ($w !== -1 ? $w : $image->width()); 101 | $h = ($h !== -1 ? $h : $image->height()); 102 | 103 | if($image->crop($x, $y, $w, $h)) { 104 | if(($image->width() <= 400 && $image->height() <= 400) || $image->resize(400)) { 105 | $imgString=$image->__toString(); 106 | 107 | $resultData=array( 108 | 'id' => $id, 109 | 'width' => $image->width(), 110 | 'height' => $image->height(), 111 | 'dataimg' =>$imgString, 112 | 'mimetype' =>$image->mimeType() 113 | ); 114 | 115 | \OC::$server->getCache()->remove($tmpkey); 116 | \OC::$server->getCache()->set($tmpkey, $image->data(), 600); 117 | $response = new JSONResponse(); 118 | $response -> setData($resultData); 119 | 120 | return $response; 121 | } 122 | } 123 | } 124 | } 125 | 126 | 127 | } 128 | 129 | /** 130 | * @NoAdminRequired 131 | */ 132 | public function getImageFromCloud(){ 133 | $id = $this -> params('id'); 134 | $path = $this -> params('path'); 135 | 136 | $localpath = \OC\Files\Filesystem::getLocalFile($path); 137 | $tmpkey = 'pin-photo-' . $id; 138 | $size = getimagesize($localpath, $info); 139 | $exif = @exif_read_data($localpath); 140 | $image = new \OCP\Image(); 141 | $image -> loadFromFile($localpath); 142 | if ($image -> width() > 500 || $image -> height() > 500) { 143 | $image -> resize(500); 144 | } 145 | $image -> fixOrientation(); 146 | 147 | $imgString = $image -> __toString(); 148 | $imgMimeType = $image -> mimeType(); 149 | if (\OC::$server->getCache()->set($tmpkey, $image -> data(), 600)) { 150 | 151 | 152 | $result['latitude'] = ''; 153 | $result['longitude'] = ''; 154 | if (isset($exif['GPSLatitude'])) { 155 | 156 | $latitude = $this->helperController->gps($exif["GPSLatitude"], $exif['GPSLatitudeRef']); 157 | $result['latitude'] = $latitude; 158 | $longitude = $this->helperController->gps($exif["GPSLongitude"], $exif['GPSLongitudeRef']); 159 | $result['longitude'] = $longitude; 160 | //OCP\Util::writeLog('pinit','LOCATIONDATA:'.$latitude.':'.$longitude,OCP\Util::DEBUG); 161 | } 162 | 163 | $result['description'] =''; 164 | $result['title'] =''; 165 | $result['country'] =''; 166 | $result['city'] =''; 167 | $result['location'] =''; 168 | 169 | if (array_key_exists('APP13',$info)) { 170 | $iptc = iptcparse($info["APP13"]); 171 | 172 | if(array_key_exists('2#120', $iptc)){ 173 | $result['description'] = $iptc['2#120'][0]; 174 | } 175 | 176 | if(array_key_exists('2#105', $iptc)){ 177 | $result['title'] = $iptc['2#105'][0]; 178 | } 179 | 180 | if(array_key_exists('2#101', $iptc)){ 181 | $result['country'] = $iptc['2#101'][0]; 182 | } 183 | 184 | if(array_key_exists('2#090', $iptc)){ 185 | $result['city'] = $iptc['2#090'][0]; 186 | } 187 | 188 | if(array_key_exists('2#092', $iptc)){ 189 | $result['location'] = $iptc['2#092'][0]; 190 | } 191 | } 192 | 193 | 194 | $resultData = array( 195 | 'id' =>$id, 196 | 'tmp' => $tmpkey, 197 | 'imgdata' => $imgString, 198 | 'mimetype' => $imgMimeType, 199 | 'description' => $result['description'], 200 | 'title' => $result['title'], 201 | 'country' => $result['country'], 202 | 'city' => $result['city'], 203 | 'location' => $result['location'], 204 | 'latitude' => $result['latitude'], 205 | 'longitude' => $result['longitude'], 206 | ); 207 | 208 | $response = new JSONResponse(); 209 | $response -> setData($resultData); 210 | 211 | return $response; 212 | 213 | } 214 | 215 | } 216 | /** 217 | * @NoAdminRequired 218 | */ 219 | public function uploadPhoto(){ 220 | //$type = $this->request->getHeader('Content-Type'); 221 | $id = $this -> params('id'); 222 | $file = $this->request->getUploadedFile('imagefile'); 223 | 224 | $error = $file['error']; 225 | if($error !== UPLOAD_ERR_OK) { 226 | $errors = array( 227 | 0=>$this->l10n->t("There is no error, the file uploaded with success"), 228 | 1=>$this->l10n->t("The uploaded file exceeds the upload_max_filesize directive in php.ini").ini_get('upload_max_filesize'), 229 | 2=>$this->l10n->t("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form"), 230 | 3=>$this->l10n->t("The uploaded file was only partially uploaded"), 231 | 4=>$this->l10n->t("No file was uploaded"), 232 | 6=>$this->l10n->t("Missing a temporary folder") 233 | ); 234 | \OCP\Util::writeLog('pinit','Uploaderror: '.$errors[$error],\OCP\Util::DEBUG); 235 | } 236 | 237 | if(file_exists($file['tmp_name'])) { 238 | $tmpkey = 'pin-photo-'.md5(basename($file['tmp_name'])); 239 | $size = getimagesize($file['tmp_name'], $info); 240 | $exif = @exif_read_data($file['tmp_name']); 241 | $image = new \OCP\Image(); 242 | if($image->loadFromFile($file['tmp_name'])) { 243 | 244 | if($image->width() > 500 || $image->height() > 500) { 245 | $image->resize(500); // Prettier resizing than with browser and saves bandwidth. 246 | } 247 | if(!$image->fixOrientation()) { // No fatal error so we don't bail out. 248 | \OCP\Util::writeLog('pinit','Couldn\'t save correct image orientation: '.$tmpkey,\OCP\Util::DEBUG); 249 | } 250 | 251 | if(\OC::$server->getCache()->set($tmpkey, $image->data(), 600)) { 252 | $imgString=$image->__toString(); 253 | 254 | $result=''; 255 | $result['latitude']=''; 256 | $result['longitude']=''; 257 | if(isset($exif['GPSLatitude'])){ 258 | 259 | $latitude = $this->helperController->gps($exif["GPSLatitude"], $exif['GPSLatitudeRef']); 260 | $result['latitude']=$latitude; 261 | $longitude = $this->helperController->gps($exif["GPSLongitude"], $exif['GPSLongitudeRef']); 262 | $result['longitude']=$longitude; 263 | } 264 | 265 | $result['description'] =''; 266 | $result['title'] =''; 267 | $result['country'] =''; 268 | $result['city'] =''; 269 | $result['location'] =''; 270 | if (array_key_exists('APP13',$info)) { 271 | $iptc = iptcparse($info["APP13"]); 272 | 273 | if(array_key_exists('2#120', $iptc)){ 274 | $result['description'] = $iptc['2#120'][0]; 275 | } 276 | 277 | if(array_key_exists('2#105', $iptc)){ 278 | $result['title'] = $iptc['2#105'][0]; 279 | } 280 | 281 | if(array_key_exists('2#101', $iptc)){ 282 | $result['country'] = $iptc['2#101'][0]; 283 | } 284 | 285 | if(array_key_exists('2#090', $iptc)){ 286 | $result['city'] = $iptc['2#090'][0]; 287 | } 288 | 289 | if(array_key_exists('2#092', $iptc)){ 290 | $result['location'] = $iptc['2#092'][0]; 291 | } 292 | 293 | } 294 | 295 | $resultData=array( 296 | 'mime'=>$file['type'], 297 | 'size'=>$file['size'], 298 | 'name'=>$file['name'], 299 | 'id'=>$id, 300 | 'tmp'=>$tmpkey, 301 | 'imgdata' =>$imgString, 302 | 'description'=>$result['description'] , 303 | 'title'=>$result['title'], 304 | 'country'=>$result['country'], 305 | 'city'=>$result['city'] , 306 | 'location'=>$result['location'], 307 | 'latitude'=>$result['latitude'], 308 | 'longitude'=>$result['longitude'], 309 | ); 310 | $response = new JSONResponse(); 311 | $response -> setData($resultData); 312 | 313 | return $response; 314 | 315 | } 316 | 317 | 318 | } 319 | 320 | 321 | 322 | } 323 | 324 | 325 | } 326 | 327 | 328 | } -------------------------------------------------------------------------------- /controller/pinwallcontroller.php: -------------------------------------------------------------------------------- 1 | . 20 | * 21 | */ 22 | 23 | namespace OCA\Pinit\Controller; 24 | 25 | use \OCP\AppFramework\Controller; 26 | use \OCP\AppFramework\Http\JSONResponse; 27 | use \OCP\AppFramework\Http\TemplateResponse; 28 | use \OCP\IRequest; 29 | use \OCP\Share; 30 | 31 | 32 | class PinWallController extends Controller { 33 | 34 | private $userId; 35 | private $pinDAO; 36 | private $pinWallDAO; 37 | private $l10n; 38 | private $helperController; 39 | 40 | 41 | 42 | public function __construct($appName, IRequest $request, $userId, $pinDAO, $pinWallDAO, $helperController, $l10n) { 43 | parent::__construct($appName, $request); 44 | $this -> userId = $userId; 45 | $this->pinDAO = $pinDAO; 46 | $this->pinWallDAO = $pinWallDAO; 47 | $this->l10n = $l10n; 48 | $this->helperController = $helperController; 49 | 50 | } 51 | 52 | /** 53 | * @NoAdminRequired 54 | */ 55 | public function getPinWallBackground(){ 56 | $result = $this->helperController->getPinWallBackgroundOptions(); 57 | $response = new JSONResponse(); 58 | $response -> setData($result); 59 | 60 | return $response; 61 | } 62 | 63 | /** 64 | * @NoAdminRequired 65 | */ 66 | public function validateItemSource($itemSource,$itemType='pinwall-'){ 67 | 68 | if(stristr($itemSource,$itemType)){ 69 | $iTempItemSource=explode($itemType,$itemSource); 70 | return (int)$iTempItemSource[1]; 71 | }else{ 72 | return $itemSource; 73 | } 74 | } 75 | 76 | /** 77 | * @NoAdminRequired 78 | */ 79 | public function getPinWall($wallId, $shared = false, $shareByLink=false, $shareOwner=''){ 80 | 81 | $aPinWallsInfo = $this->pinWallDAO->getSingle($wallId, $shared); 82 | 83 | $owner=$this->userId; 84 | 85 | if($aPinWallsInfo['user_id'] != $owner && !\OC_Group::inGroup($owner, 'admin')) { 86 | 87 | if($shareByLink==true){ 88 | $sharedPinwallByLink=\OCP\Share::getItemSharedWithByLink('pinwall','pinwall-'.$aPinWallsInfo['id'],$shareOwner); 89 | if(!$sharedPinwallByLink || !($sharedPinwallByLink['permissions'] & \OCP\PERMISSION_READ)){ 90 | throw new \Exception( 91 | $this->l10n->t( 92 | 'You do not have the permissions to read pins.' 93 | ) 94 | ); 95 | } 96 | $aPinWallsInfo['permissions'] = $sharedPinwallByLink['permissions']; 97 | } 98 | 99 | if($shareByLink==false && $shared == true){ 100 | $sharedPinwall = \OCP\Share::getItemSharedWithBySource('pinwall', 'pinwall-'.$aPinWallsInfo['id']); 101 | if (!$sharedPinwall || !($sharedPinwall['permissions'] & \OCP\PERMISSION_READ)) { 102 | throw new \Exception( 103 | $this->l10n->t( 104 | 'You do not have the permissions to read pins.' 105 | ) 106 | ); 107 | } 108 | $aPinWallsInfo['permissions'] = $sharedPinwall['permissions']; 109 | } 110 | 111 | $aPinWallsInfo['countPins'] = $this->pinWallDAO->getPinsCount($aPinWallsInfo['id'],true); 112 | 113 | 114 | } else { 115 | $aPinWallsInfo['permissions'] = \OCP\PERMISSION_ALL; 116 | $aPinWallsInfo['countPins'] =$this->pinWallDAO->getPinsCount($aPinWallsInfo['id']); 117 | } 118 | 119 | 120 | $aPinWallsInfo['wallbg'] = ''; 121 | if($aPinWallsInfo['wallbackground'] >0){ 122 | $aPinWallsInfo['wallbg'] = $this->helperController -> getPinWallBackground($aPinWallsInfo['wallbackground']); 123 | } 124 | $aPinWallsInfo['user_displayname']=\OCP\User::getDisplayName($aPinWallsInfo['user_id']); 125 | 126 | return $aPinWallsInfo; 127 | } 128 | 129 | /** 130 | * @NoAdminRequired 131 | */ 132 | public function getPinWalls($user='',$shared=true){ 133 | if($user=='') { 134 | $user=$this -> userId; 135 | } 136 | 137 | $aPinWallsInfo = $this->pinWallDAO->getAll($user); 138 | $sharedPinnwallsInfo = Share::getItemsSharedWith('pinwall', ShareController::FORMAT_PINWALL); 139 | 140 | if(is_array($aPinWallsInfo)){ 141 | $result=array(); 142 | foreach($aPinWallsInfo as $row){ 143 | $row['wallbg'] = ''; 144 | if($row['wallbackground'] >0){ 145 | $row['wallbg'] = $this->helperController -> getPinWallBackground($row['wallbackground']); 146 | } 147 | $row['permissions'] = \OCP\PERMISSION_ALL; 148 | $row['countPins'] = $this->pinWallDAO->getPinsCount($row['id'],false); 149 | $result[]=$row; 150 | 151 | } 152 | } 153 | 154 | 155 | 156 | if(is_array($sharedPinnwallsInfo)){ 157 | foreach($sharedPinnwallsInfo as $sharedInfo) { 158 | $sharedInfo['wallbg'] = ''; 159 | if($sharedInfo['wallbackground'] >0){ 160 | $sharedInfo['wallbg'] = $this->helperController -> getPinWallBackground($sharedInfo['wallbackground']); 161 | } 162 | $sharedInfo['countPins'] = $this->pinWallDAO->getPinsCount($sharedInfo['id'],true); 163 | $result[]=$sharedInfo; 164 | 165 | } 166 | } 167 | 168 | if(!count($aPinWallsInfo)) { 169 | $result[] =$this->addDefault(); 170 | } 171 | 172 | 173 | $response = new JSONResponse(); 174 | $response -> setData($result); 175 | return $response; 176 | 177 | 178 | } 179 | 180 | /** 181 | * @NoAdminRequired 182 | */ 183 | 184 | public function newPinWall(){ 185 | $saveArray = $this -> getParams(); 186 | $newId = $this->pinWallDAO->save($saveArray); 187 | 188 | $result=array(); 189 | $result=$this->getPinWall($newId); 190 | 191 | $response = new JSONResponse(); 192 | $response -> setData($result); 193 | return $response; 194 | } 195 | 196 | /** 197 | * @NoAdminRequired 198 | */ 199 | public function editPinWall(){ 200 | $saveArray = $this -> getParams(); 201 | $bSuccess = $this->pinWallDAO->update($saveArray); 202 | if ($bSuccess) { 203 | $result[]=array(); 204 | $result = $this->getPinWall($saveArray['wall_id']); 205 | 206 | $response = new JSONResponse(); 207 | $response -> setData($result); 208 | return $response; 209 | } 210 | } 211 | 212 | /** 213 | * @NoAdminRequired 214 | */ 215 | public function deletePinWall(){ 216 | $wallId = $this -> params('wallId'); 217 | $aPins=$this->pinDAO->getAll($wallId, true); 218 | if(is_array($aPins)){ 219 | foreach($aPins as $pinInfo){ 220 | $this->pinDAO->delete($pinInfo['id']); 221 | } 222 | } 223 | 224 | $bSuccess = $this->pinWallDAO->delete($wallId); 225 | if ($bSuccess) { 226 | $result=array('id'=>$wallId); 227 | $response = new JSONResponse(); 228 | $response -> setData($result); 229 | return $response; 230 | } 231 | 232 | if(count($this->getPinWalls(\OCP\User::getUser())) == 0) { 233 | $this->addDefault(); 234 | } 235 | 236 | } 237 | 238 | /** 239 | * @NoAdminRequired 240 | */ 241 | public function addDefault() { 242 | $DefaultName=\OCP\User::getDisplayName().' Pins'; 243 | $saveArray=array('name'=>$DefaultName,'active'=>1,'wallorder'=>1,'wallbackground'=>0); 244 | $newId = $this->pinWallDAO->save($saveArray); 245 | 246 | $result=$this->getPinWall($newId); 247 | 248 | return $result; 249 | } 250 | 251 | /** 252 | * @NoAdminRequired 253 | */ 254 | public function saveSortOrderPinwall(){ 255 | 256 | $saveArray['wallId'] = $this -> params('wallId'); 257 | $saveArray['iOrder'] = $this -> params('iOrder'); 258 | 259 | 260 | $bSuccess = $this->pinWallDAO -> updateSortOrder($saveArray); 261 | 262 | if($bSuccess){ 263 | return true; 264 | }else { 265 | return false; 266 | } 267 | } 268 | 269 | } -------------------------------------------------------------------------------- /controller/publiccontroller.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | namespace OCA\Pinit\Controller; 25 | 26 | use \OCP\AppFramework\Controller; 27 | use \OCP\AppFramework\Http; 28 | use \OCP\AppFramework\Http\JSONResponse; 29 | use \OCP\AppFramework\Http\TemplateResponse; 30 | use \OCP\IRequest; 31 | use \OCP\Share; 32 | use \OCP\IL10N; 33 | use \OCP\IURLGenerator; 34 | use \OCP\ISession; 35 | use \OCP\Security\IHasher; 36 | use \OCP\AppFramework\Http\RedirectResponse; 37 | use \OCP\AppFramework\Utility\IControllerMethodReflector; 38 | 39 | class PublicController extends Controller { 40 | 41 | private $pinwallController; 42 | 43 | private $l10n; 44 | /** @var \OC\URLGenerator */ 45 | protected $urlGenerator; 46 | 47 | /** 48 | * @type ISession 49 | * */ 50 | private $session; 51 | 52 | /** 53 | * @type IControllerMethodReflector 54 | */ 55 | protected $reflector; 56 | 57 | private $token; 58 | 59 | public function __construct($appName, IRequest $request, $pinwallController, IL10N $l10n, ISession $session, IControllerMethodReflector $reflector, IURLGenerator $urlGenerator) { 60 | parent::__construct($appName, $request); 61 | $this->l10n = $l10n; 62 | $this->pinwallController = $pinwallController; 63 | $this->urlGenerator = $urlGenerator; 64 | $this->session = $session; 65 | $this->reflector=$reflector; 66 | 67 | } 68 | 69 | public function getLanguageCode() { 70 | return $this->l10n->getLanguageCode(); 71 | } 72 | 73 | 74 | public function beforeController($controller, $methodName) { 75 | if ($this->reflector->hasAnnotation('Guest')) { 76 | return; 77 | } 78 | $isPublicPage = $this->reflector->hasAnnotation('PublicPage'); 79 | if ($isPublicPage) { 80 | $this->validateAndSetTokenBasedEnv(); 81 | } else { 82 | //$this->environment->setStandardEnv(); 83 | } 84 | } 85 | 86 | 87 | private function validateAndSetTokenBasedEnv() { 88 | $this->token = $this->request->getParam('t'); 89 | } 90 | 91 | 92 | /** 93 | *@PublicPage 94 | * @NoCSRFRequired 95 | * @UseSession 96 | */ 97 | public function index($token) { 98 | 99 | if ($token) { 100 | $linkItem = Share::getShareByToken($token, false); 101 | //Share Fix Link 102 | if (is_array($linkItem) && isset($linkItem['uid_owner'])) { 103 | $type = $linkItem['item_type']; 104 | $pinWallId = $this -> pinwallController -> validateItemSource($linkItem['item_source']); 105 | 106 | $shareOwner = $linkItem['uid_owner']; 107 | $path = null; 108 | $rootLinkItem = Share::resolveReShare($linkItem); 109 | $pinWallOwner = $rootLinkItem['uid_owner']; 110 | $PinwallName = $linkItem['item_target']; 111 | $ownerDisplayName = \OCP\User::getDisplayName($pinWallOwner); 112 | 113 | // stupid copy and paste job 114 | // stupid copy and paste job 115 | if (isset($linkItem['share_with'])) { 116 | // Authenticate share_with 117 | 118 | $password=$this->params('password'); 119 | 120 | if (isset($password)) { 121 | 122 | if ($linkItem['share_type'] == \OCP\Share::SHARE_TYPE_LINK) { 123 | // Check Password 124 | $newHash = ''; 125 | if(\OC::$server->getHasher()->verify($password, $linkItem['share_with'], $newHash)) { 126 | $this->session->set('public_link_authenticated', $linkItem['id']); 127 | if(!empty($newHash)) { 128 | 129 | } 130 | } else { 131 | \OCP\Util::addStyle('files_sharing', 'authenticate'); 132 | $params=array( 133 | 'wrongpw'=>true 134 | ); 135 | return new TemplateResponse('files_sharing', 'authenticate', $params, 'guest'); 136 | 137 | } 138 | } else { 139 | \OCP\Util::writeLog('share', 'Unknown share type '.$linkItem['share_type'].' for share id '.$linkItem['id'], \OCP\Util::ERROR); 140 | return false; 141 | } 142 | 143 | } else { 144 | // Check if item id is set in session 145 | if ( ! $this->session->exists('public_link_authenticated') || $this->session->get('public_link_authenticated') !== $linkItem['id']) { 146 | // Prompt for password 147 | \OCP\Util::addStyle('files_sharing', 'authenticate'); 148 | 149 | $params=array(); 150 | return new TemplateResponse('files_sharing', 'authenticate', $params, 'guest'); 151 | 152 | } 153 | } 154 | } 155 | 156 | \OCP\Util::addscript('pinit', '3rdparty/tag-it'); 157 | \OCP\Util::addscript('pinit', '3rdparty/leaflet'); 158 | \OCP\Util::addscript('pinit', '3rdparty/Leaflet.EdgeMarker'); 159 | \OCP\Util::addscript('pinit', '3rdparty/leaflet.markercluster-src'); 160 | \OCP\Util::addscript('pinit', '3rdparty/leaflet.awesome-markers'); 161 | \OCP\Util::addscript('pinit', '3rdparty/gridify'); 162 | \OCP\Util::addscript('pinit', 'jquery.scrollTo'); 163 | \OCP\Util::addScript('pinit', 'public'); 164 | $PinWallData=$this->pinwallController->getPinWall($pinWallId,true,true,$pinWallOwner); 165 | 166 | $params=[ 167 | 'token' => $token, 168 | 'requesttoken' => \OCP\Util::callRegister(), 169 | 'displayName' => $ownerDisplayName, 170 | 'PinwallName' => $PinwallName, 171 | 'PinwallBg' => $PinWallData['wallbg'], 172 | ]; 173 | $csp = new \OCP\AppFramework\Http\ContentSecurityPolicy(); 174 | $csp->addAllowedImageDomain('*'); 175 | $csp->addAllowedMediaDomain('*'); 176 | $csp->addAllowedFrameDomain('*'); 177 | $response = new TemplateResponse('pinit', 'public',$params,'base'); 178 | $response->setContentSecurityPolicy($csp); 179 | return $response; 180 | 181 | } 182 | 183 | } 184 | 185 | $tmpl = new \OCP\Template('', '404', 'guest'); 186 | $tmpl->printPage(); 187 | 188 | //return new JSONResponse()->setStatus(Http::STATUS_NOT_FOUND); 189 | } 190 | 191 | 192 | 193 | } -------------------------------------------------------------------------------- /controller/sharecontroller.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | namespace OCA\Pinit\Controller; 25 | use OCP\Share_Backend_Collection; 26 | use \OCP\Share; 27 | use OCA\Pinit\AppInfo\Application; 28 | 29 | 30 | class ShareController implements Share_Backend_Collection{ 31 | 32 | const FORMAT_PINWALL = 1; 33 | 34 | private $app; 35 | private $pinwallDao; 36 | private $pinDao; 37 | 38 | 39 | public function __construct() { 40 | $app = new Application(); 41 | $container = $app->getContainer(); 42 | $this->app = $app; 43 | $this->pinwallDao = $container->query('PinWallDAO'); 44 | $this->pinDao = $container->query('PinDAO'); 45 | } 46 | 47 | 48 | public function isValidSource($itemSource, $uidOwner) { 49 | // Add Fix 50 | $itemSource = $this -> validateItemSource($itemSource); 51 | 52 | $pinnwall =$this->pinwallDao -> getSingle( $itemSource , true); 53 | if( $pinnwall === false || $pinnwall['user_id'] != $uidOwner) { 54 | return false; 55 | } 56 | return true; 57 | } 58 | 59 | /** 60 | * @NoAdminRequired 61 | */ 62 | public function validateItemSource($itemSource,$itemType='pinwall-'){ 63 | 64 | if(stristr($itemSource,$itemType)){ 65 | $iTempItemSource=explode($itemType,$itemSource); 66 | return (int)$iTempItemSource[1]; 67 | }else{ 68 | return $itemSource; 69 | } 70 | } 71 | 72 | public function generateTarget($itemSource, $shareWith, $exclude = null) { 73 | //Add Fix 74 | $itemSource = $this -> validateItemSource($itemSource); 75 | 76 | $pinnwall =$this->pinwallDao -> getSingle( $itemSource , true); 77 | $user_pinwalls = array(); 78 | foreach($this->pinwallDao -> getAll($shareWith) as $user_pinwall) { 79 | $user_pinwalls[] = $user_pinwall['displayname']; 80 | } 81 | 82 | $name = $pinnwall['displayname']; 83 | $suffix = ''; 84 | while (in_array($name.$suffix, $user_pinwalls)) { 85 | $suffix++; 86 | } 87 | 88 | return $name.$suffix; 89 | } 90 | 91 | public function formatItems($items, $format, $parameters = null) { 92 | $pinnwalls = array(); 93 | if ($format == self::FORMAT_PINWALL) { 94 | foreach ($items as $item) { 95 | //Add Fix 96 | $item['item_source'] = $this -> validateItemSource($item['item_source']); 97 | $pinnwall = $this->pinwallDao -> getSingle( $item['item_source'], true ); 98 | 99 | if ($pinnwall) { 100 | $pinnwall['displayname'] = $item['item_target']; 101 | $pinnwall['permissions'] = $item['permissions']; 102 | $pinnwalls[] = $pinnwall; 103 | } 104 | } 105 | } 106 | return $pinnwalls; 107 | } 108 | 109 | public function isShareTypeAllowed($shareType) { 110 | return true; 111 | } 112 | 113 | public function getChildren($itemSource) { 114 | $itemSource = $this -> validateItemSource($itemSource); 115 | 116 | $query = \OCP\DB::prepare('SELECT `id`, `title` FROM `*PREFIX*pinit_pins` WHERE `wall_id` = ?'); 117 | $result = $query->execute(array($itemSource)); 118 | $children = array(); 119 | while ($row = $result->fetchRow()) { 120 | $children[] = array('source' => $row['id'], 'target' => $row['title']); 121 | } 122 | return $children; 123 | } 124 | 125 | 126 | 127 | } 128 | -------------------------------------------------------------------------------- /controller/tagscontroller.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | namespace OCA\Pinit\Controller; 25 | 26 | use \OCP\AppFramework\Controller; 27 | use \OCP\AppFramework\Http\JSONResponse; 28 | use \OCP\IRequest; 29 | 30 | 31 | class TagsController extends Controller { 32 | 33 | 34 | /** 35 | * @brief categories of the user 36 | */ 37 | protected $categories = null; 38 | private $l10n; 39 | private $helperController; 40 | private $pinDAO; 41 | private $pinWallDAO; 42 | 43 | public function __construct($appName, IRequest $request, $pinDAO, $pinWallDAO, $helperController, $l10n) { 44 | parent::__construct($appName, $request); 45 | 46 | $this->l10n = $l10n; 47 | $this->helperController = $helperController; 48 | $this->pinDAO = $pinDAO; 49 | $this->pinWallDAO = $pinWallDAO; 50 | } 51 | 52 | 53 | /** 54 | * @NoAdminRequired 55 | */ 56 | public function addTag(){ 57 | $newTag = trim($this -> params('tag')); 58 | if($newTag !=''){ 59 | $categories=explode(',',$newTag); 60 | $this->getVCategories()->addMultiple($categories, true); 61 | } 62 | $existCats = $this -> getTagOptions(); 63 | $tag=array(); 64 | for($i=0; $i helperController -> genColorCodeFromText(trim($existCats[$i]),80); 66 | $tag[$i]=array( 67 | 'name'=>$existCats[$i], 68 | 'bgcolor' =>$backgroundColor, 69 | 'color' => $this -> helperController -> generateTextColor($backgroundColor), 70 | ); 71 | } 72 | 73 | $tagsReturn['tagslist']=$tag; 74 | $tagsReturn['categories']=$existCats; 75 | 76 | $response = new JSONResponse(); 77 | $response -> setData($tagsReturn); 78 | 79 | return $response; 80 | 81 | } 82 | 83 | /** 84 | * @NoAdminRequired 85 | */ 86 | public function deleteTag(){ 87 | 88 | $deleteTag=trim($this -> params('tag')); 89 | 90 | if($deleteTag !=''){ 91 | 92 | $this->getVCategories()->delete($deleteTag); 93 | } 94 | $existCats=$this->getTagOptions(); 95 | 96 | $tag=array(); 97 | for($i=0; $i helperController -> genColorCodeFromText(trim($existCats[$i]),80); 99 | $tag[$i]=array( 100 | 'name'=>$existCats[$i], 101 | 'bgcolor' =>$backgroundColor, 102 | 'color' => $this -> helperController -> generateTextColor($backgroundColor), 103 | ); 104 | } 105 | 106 | $tagsReturn['tagslist']=$tag; 107 | $tagsReturn['categories']=$existCats; 108 | 109 | $response = new JSONResponse(); 110 | $response -> setData($tagsReturn); 111 | 112 | return $response; 113 | } 114 | /** 115 | * @NoAdminRequired 116 | */ 117 | public function loadTags(){ 118 | $existCats=$this->getTagOptions(); 119 | $tag=array(); 120 | for($i=0; $i helperController -> genColorCodeFromText(trim($existCats[$i]),80); 122 | $tag[$i]=array( 123 | 'name'=>$existCats[$i], 124 | 'bgcolor' =>$backgroundColor, 125 | 'color' => $this -> helperController -> generateTextColor($backgroundColor), 126 | ); 127 | } 128 | 129 | $tagsReturn['tagslist']=$tag; 130 | $tagsReturn['categories']=$existCats; 131 | 132 | $response = new JSONResponse(); 133 | $response -> setData($tagsReturn); 134 | 135 | return $response; 136 | } 137 | 138 | public function getVCategories() { 139 | 140 | if (is_null($this->categories)) { 141 | $this->categories = \OC::$server->getTagManager()->load('pinit'); 142 | if($this->categories ->isEmpty('pinit')) { 143 | $this->scanCategories(); 144 | $this->categories = \OC::$server->getTagManager()->load('pinit', $this->getDefaultTags()); 145 | } 146 | 147 | } 148 | return $this->categories; 149 | } 150 | 151 | /** 152 | * @brief returns the categories of the vcategories object 153 | * @return (array) $categories 154 | */ 155 | public function getTagOptions() { 156 | $getNames = function($tag) { 157 | return $tag['name']; 158 | }; 159 | $categories = $this->getVCategories()->getTags(); 160 | $categories = array_map($getNames, $categories); 161 | return $categories; 162 | } 163 | 164 | 165 | /** 166 | * @brief returns the default categories of ownCloud 167 | * @return (array) $categories 168 | */ 169 | public function getDefaultTags() { 170 | 171 | return array( 172 | (string)$this->l10n->t('Sport'), 173 | (string)$this->l10n->t('Internet'), 174 | (string)$this->l10n->t('Work'), 175 | (string)$this->l10n->t('Other'), 176 | ); 177 | } 178 | 179 | /** 180 | * scan vcards for categories. 181 | * @param $vccontacts VCards to scan. null to check all vcards for the current user. 182 | */ 183 | public function scanCategories($vpins = null) { 184 | 185 | if (is_null($vpins)) { 186 | $pinwalls = $this->pinWallDAO->getAll(\OCP\USER::getUser()); 187 | if(count($pinwalls) > 0) { 188 | $vpins = array(); 189 | foreach($pinwalls as $pinwall) { 190 | if($pinwall['user_id'] === \OCP\User::getUser()) { 191 | $pinwall_pins = $this->pinDAO->getAll($pinwall['id'],true); 192 | $vpins = $vpins + $pinwall_pins; 193 | } 194 | } 195 | } 196 | } 197 | 198 | if(is_array($vpins) && count($vpins) > 0) { 199 | 200 | $categories = \OC::$server->getTagManager()->load('pinit'); 201 | 202 | $getName = function($tag) { 203 | return array('name'=>$tag['name']); 204 | }; 205 | 206 | $tags = array_map($getName, $categories->getTags()); 207 | $categories->delete($tags); 208 | foreach($vpins as $pinInfo){ 209 | if($pinInfo['categories']!='') { 210 | $categories->addMultiple($pinInfo['categories'], true, $pinInfo['id']); 211 | } 212 | } 213 | } 214 | 215 | 216 | } 217 | 218 | 219 | } -------------------------------------------------------------------------------- /css/3rdparty/MarkerCluster.Default.css: -------------------------------------------------------------------------------- 1 | .marker-cluster-small { 2 | background-color: rgba(181, 226, 140, 0.6); 3 | } 4 | .marker-cluster-small div { 5 | background-color: rgba(110, 204, 57, 0.6); 6 | } 7 | 8 | .marker-cluster-medium { 9 | background-color: rgba(241, 211, 87, 0.6); 10 | } 11 | .marker-cluster-medium div { 12 | background-color: rgba(240, 194, 12, 0.6); 13 | } 14 | 15 | .marker-cluster-large { 16 | background-color: rgba(253, 156, 115, 0.6); 17 | } 18 | .marker-cluster-large div { 19 | background-color: rgba(241, 128, 23, 0.6); 20 | } 21 | 22 | .marker-cluster { 23 | background-clip: padding-box; 24 | border-radius: 20px; 25 | } 26 | .marker-cluster div { 27 | width: 30px; 28 | height: 30px; 29 | margin-left: 5px; 30 | margin-top: 5px; 31 | 32 | text-align: center; 33 | border-radius: 15px; 34 | font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif; 35 | } 36 | .marker-cluster span { 37 | line-height: 30px; 38 | } -------------------------------------------------------------------------------- /css/3rdparty/MarkerCluster.Default.ie.css: -------------------------------------------------------------------------------- 1 | /* IE 6-8 fallback colors */ 2 | .marker-cluster-small { 3 | background-color: rgb(181, 226, 140); 4 | } 5 | .marker-cluster-small div { 6 | background-color: rgb(110, 204, 57); 7 | } 8 | 9 | .marker-cluster-medium { 10 | background-color: rgb(241, 211, 87); 11 | } 12 | .marker-cluster-medium div { 13 | background-color: rgb(240, 194, 12); 14 | } 15 | 16 | .marker-cluster-large { 17 | background-color: rgb(253, 156, 115); 18 | } 19 | .marker-cluster-large div { 20 | background-color: rgb(241, 128, 23); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /css/3rdparty/MarkerCluster.css: -------------------------------------------------------------------------------- 1 | .leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow { 2 | -webkit-transition: -webkit-transform 0.2s ease-out, opacity 0.2s ease-in; 3 | -moz-transition: -moz-transform 0.2s ease-out, opacity 0.2s ease-in; 4 | -o-transition: -o-transform 0.2s ease-out, opacity 0.2s ease-in; 5 | transition: transform 0.2s ease-out, opacity 0.2s ease-in; 6 | } 7 | -------------------------------------------------------------------------------- /css/3rdparty/fontello/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Font license info 2 | 3 | 4 | ## Font Awesome 5 | 6 | Copyright (C) 2012 by Dave Gandy 7 | 8 | Author: Dave Gandy 9 | License: SIL () 10 | Homepage: http://fortawesome.github.com/Font-Awesome/ 11 | 12 | 13 | ## Iconic 14 | 15 | Copyright (C) 2012 by P.J. Onori 16 | 17 | Author: P.J. Onori 18 | License: SIL (http://scripts.sil.org/OFL) 19 | Homepage: http://somerandomdude.com/work/iconic/ 20 | 21 | 22 | ## Elusive 23 | 24 | Copyright (C) 2013 by Aristeides Stathopoulos 25 | 26 | Author: Aristeides Stathopoulos 27 | License: SIL (http://scripts.sil.org/OFL) 28 | Homepage: http://aristeides.com/ 29 | 30 | 31 | ## Entypo 32 | 33 | Copyright (C) 2012 by Daniel Bruce 34 | 35 | Author: Daniel Bruce 36 | License: SIL (http://scripts.sil.org/OFL) 37 | Homepage: http://www.entypo.com 38 | 39 | 40 | ## Zocial 41 | 42 | Copyright (C) 2012 by Sam Collins 43 | 44 | Author: Sam Collins 45 | License: MIT (http://opensource.org/licenses/mit-license.php) 46 | Homepage: http://zocial.smcllns.com/ 47 | 48 | 49 | -------------------------------------------------------------------------------- /css/3rdparty/fontello/README.txt: -------------------------------------------------------------------------------- 1 | This webfont is generated by http://fontello.com open source project. 2 | 3 | 4 | ================================================================================ 5 | Please, note, that you should obey original font licences, used to make this 6 | webfont pack. Details available in LICENSE.txt file. 7 | 8 | - Usually, it's enough to publish content of LICENSE.txt file somewhere on your 9 | site in "About" section. 10 | 11 | - If your project is open-source, usually, it will be ok to make LICENSE.txt 12 | file publically available in your repository. 13 | 14 | - Fonts, used in Fontello, don't require to make clickable links on your site. 15 | But any kind of additional authors crediting is welcome. 16 | ================================================================================ 17 | 18 | 19 | Comments on archive content 20 | --------------------------- 21 | 22 | - /font/* - fonts in different formats 23 | 24 | - /css/* - different kinds of css, for all situations. Should be ok with 25 | twitter bootstrap. Also, you can skip style and assign icon classes 26 | directly to text elements, if you don't mind about IE7. 27 | 28 | - demo.html - demo file, to show your webfont content 29 | 30 | - LICENSE.txt - license info about source fonts, used to build your one. 31 | 32 | - config.json - keeps your settings. You can import it back to fontello anytime, 33 | to continue your work 34 | 35 | 36 | Why so many CSS files ? 37 | ----------------------- 38 | 39 | Because we like to fit all your needs :) 40 | 41 | - basic file, .css - is usually enougth, in contains @font-face 42 | and character codes definition 43 | 44 | - *-ie7.css - if you need IE7 support, but still don't wish to put char codes 45 | directly into html 46 | 47 | - *-codes.css and *-ie7-codes.css - if you like to use your own @font-face 48 | rules, but still wish to benefit of css generation. That can be very 49 | convenient for automated assets build systems. When you need to update font - 50 | no needs to manually edit files, just override old version with archive 51 | content. See fontello source codes for example. 52 | 53 | - *-embedded.css - basic css file, but with embedded WOFF font, to avoid 54 | CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain. 55 | We strongly recommend to resolve this issue by `Access-Control-Allow-Origin` 56 | server headers. But if you ok with dirty hack - this file is for you. Note, 57 | that data url moved to separate @font-face to avoid problems with 2 | 3 | 4 | 278 | 279 | 291 | 292 | 293 |
294 |

295 | fontello 296 | font demo 297 |

298 | 301 |
302 |
303 |
304 |
icon-globe0xe800
305 |
icon-pin0xe801
306 |
icon-move0xe802
307 |
icon-close0xe803
308 |
309 |
310 |
icon-delete0xe804
311 |
icon-info0xe805
312 |
icon-public0xe806
313 |
icon-rename0xe807
314 |
315 |
316 |
icon-share0xe808
317 |
icon-upload0xe809
318 |
icon-add0xe80a
319 |
icon-lock0xe80b
320 |
321 |
322 |
icon-refresh0xe80c
323 |
icon-rss-alt0xe820
324 |
icon-block0xe828
325 |
icon-spinner0xe82b
326 |
327 |
328 |
icon-location0xe82e
329 |
icon-flag0xe834
330 |
icon-pinboard0xe835
331 |
332 |
333 | 334 | 335 | -------------------------------------------------------------------------------- /css/3rdparty/fontello/font/fontello.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/fontello/font/fontello.eot -------------------------------------------------------------------------------- /css/3rdparty/fontello/font/fontello.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Copyright (C) 2015 by original authors @ fontello.com 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /css/3rdparty/fontello/font/fontello.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/fontello/font/fontello.ttf -------------------------------------------------------------------------------- /css/3rdparty/fontello/font/fontello.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/fontello/font/fontello.woff -------------------------------------------------------------------------------- /css/3rdparty/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /css/3rdparty/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /css/3rdparty/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /css/3rdparty/images/layers-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/images/layers-2x.png -------------------------------------------------------------------------------- /css/3rdparty/images/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/images/layers.png -------------------------------------------------------------------------------- /css/3rdparty/images/marker-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/images/marker-icon-2x.png -------------------------------------------------------------------------------- /css/3rdparty/images/marker-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/images/marker-icon.png -------------------------------------------------------------------------------- /css/3rdparty/images/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/images/marker-shadow.png -------------------------------------------------------------------------------- /css/3rdparty/images/markers-matte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/images/markers-matte.png -------------------------------------------------------------------------------- /css/3rdparty/images/markers-matte@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/images/markers-matte@2x.png -------------------------------------------------------------------------------- /css/3rdparty/images/markers-plain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/images/markers-plain.png -------------------------------------------------------------------------------- /css/3rdparty/images/markers-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/images/markers-shadow.png -------------------------------------------------------------------------------- /css/3rdparty/images/markers-shadow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/images/markers-shadow@2x.png -------------------------------------------------------------------------------- /css/3rdparty/images/markers-soft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/images/markers-soft.png -------------------------------------------------------------------------------- /css/3rdparty/images/markers-soft@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/css/3rdparty/images/markers-soft@2x.png -------------------------------------------------------------------------------- /css/3rdparty/jquery.tagit.css: -------------------------------------------------------------------------------- 1 | .ui-autocomplete { 2 | background-color: #fff; 3 | position: absolute; 4 | cursor: default; 5 | list-style: none; 6 | margin: 25px 0 0; 7 | padding: 0; 8 | border: 1px solid #E5E5E5; 9 | border-top: none; 10 | -moz-border-radius: 0 0 10px 10px; 11 | border-radius: 0 0 10px 10px; 12 | -moz-box-shadow: 0 3px 5px #888; 13 | -webkit-box-shadow: 0 3px 5px #888; 14 | box-shadow: 0 3px 5px #888; 15 | font-size: 12px; 16 | } 17 | 18 | .ui-autocomplete .ui-menu-item { 19 | padding: 0; 20 | margin: 0; 21 | } 22 | 23 | .ui-autocomplete .ui-menu-item a { 24 | display: block; 25 | padding: 4px 6px; 26 | margin: 0; 27 | text-decoration: none; 28 | line-height: 12px; 29 | border-bottom: 1px solid #E5E5E5; 30 | border-top: 1px solid #fff; 31 | color: #78959D; 32 | 33 | } 34 | 35 | .ui-autocomplete .ui-menu-item a.ui-state-hover, 36 | .ui-autocomplete .ui-menu-item a.ui-state-active { 37 | background-color: #e3e3e3; 38 | color: #555; 39 | border-color: #f7f7f7; 40 | } 41 | 42 | .ui-autocomplete-loading { 43 | background: white url(ui-anim_basic_16x16.gif) right center no-repeat; 44 | } 45 | 46 | ul.tagit { 47 | cursor: text; 48 | overflow: auto; 49 | font-size: 14px; 50 | width: 97%; 51 | padding: 3px; 52 | margin-top: 2px; 53 | margin-right: 6px; 54 | margin-bottom: 16px; 55 | border: 1px solid #E5E5E5; 56 | background: #fff; 57 | color: #555; 58 | } 59 | 60 | ul.tagit li { 61 | -moz-border-radius: 5px; 62 | border-radius: 5px; 63 | display: block; 64 | float: left; 65 | margin: 2px 5px 2px 0; 66 | position: relative; 67 | } 68 | 69 | ul.tagit.ui-sortable li.tagit-choice a.ui-icon.ui-icon-grip-dotted-vertical{ 70 | float: left; 71 | width: 12px; 72 | margin-left: -5px; 73 | cursor: move; 74 | } 75 | 76 | ul.tagit li.tagit-choice { 77 | background-color: #f7f7f7; 78 | border: 1px solid #f2f2f2; 79 | padding: 2px 13px 3px 4px; 80 | height:20px; 81 | } 82 | 83 | ul.tagit li.tagit-choice.selected { 84 | background-color: #f5b0b0; 85 | border-color: #f76464; 86 | } 87 | 88 | ul.tagit li.tagit-choice:hover { 89 | background-color: #f2f2f2; 90 | border-color: #e0e0e0; 91 | } 92 | 93 | ul.tagit li.tagit-new { 94 | padding: 2px 4px 3px; 95 | padding: 2px 4px 1px; 96 | padding: 2px 4px 1px 0; 97 | } 98 | 99 | ul.tagit li.tagit-choice input { 100 | display: block; 101 | float: left; 102 | margin: 0 5px 0 0; 103 | padding-top: 2px; 104 | padding-bottom: 2px; 105 | } 106 | 107 | ul.tagit li.tagit-choice a.tagit-close { 108 | color: #777777; 109 | cursor: pointer; 110 | font-size: 12px; 111 | font-weight: bold; 112 | outline: medium none; 113 | padding: 2px 0 2px 3px; 114 | text-decoration: none; 115 | position: absolute; 116 | display: block; 117 | top: 0; 118 | right: 3px; 119 | 120 | text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.7); 121 | } 122 | 123 | ul.tagit li.tagit-choice a.tagit-close:hover { 124 | color: #535353; 125 | } 126 | 127 | ul.tagit input[type="text"] { 128 | -moz-box-sizing: border-box; 129 | border: none !important; 130 | margin: 0 !important; 131 | padding: 0 !important; 132 | width: inherit !important; 133 | outline: none; 134 | } 135 | 136 | .tagit-hiddenSelect { 137 | display:none; 138 | } -------------------------------------------------------------------------------- /css/3rdparty/leaflet.awesome-markers.css: -------------------------------------------------------------------------------- 1 | /* 2 | Author: L. Voogdt 3 | License: MIT 4 | Version: 1.0 5 | */ 6 | 7 | /* Marker setup */ 8 | .awesome-marker { 9 | background: url('./images/markers-soft.png') no-repeat 0 0; 10 | width: 35px; 11 | height: 46px; 12 | position:absolute; 13 | left:0; 14 | top:0; 15 | display: block; 16 | text-align: center; 17 | } 18 | 19 | .awesome-marker-shadow { 20 | background: url('./images/markers-shadow.png') no-repeat 0 0; 21 | width: 36px; 22 | height: 16px; 23 | } 24 | 25 | /* Retina displays */ 26 | @media (min--moz-device-pixel-ratio: 1.5),(-o-min-device-pixel-ratio: 3/2), 27 | (-webkit-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5),(min-resolution: 1.5dppx) { 28 | .awesome-marker { 29 | background-image: url('./images/markers-soft@2x.png'); 30 | background-size: 720px 46px; 31 | } 32 | .awesome-marker-shadow { 33 | background-image: url('./images/markers-shadow@2x.png'); 34 | background-size: 35px 16px; 35 | } 36 | } 37 | 38 | .awesome-marker i { 39 | color: #333; 40 | margin-top: 10px; 41 | display: inline-block; 42 | font-size: 14px; 43 | } 44 | 45 | .awesome-marker .icon-white { 46 | color: #fff; 47 | } 48 | 49 | /* Colors */ 50 | .awesome-marker-icon-red { 51 | background-position: 0 0; 52 | } 53 | 54 | .awesome-marker-icon-darkred { 55 | background-position: -180px 0; 56 | } 57 | 58 | .awesome-marker-icon-lightred { 59 | background-position: -360px 0; 60 | } 61 | 62 | .awesome-marker-icon-orange { 63 | background-position: -36px 0; 64 | } 65 | 66 | .awesome-marker-icon-beige { 67 | background-position: -396px 0; 68 | } 69 | 70 | .awesome-marker-icon-green { 71 | background-position: -72px 0; 72 | } 73 | 74 | .awesome-marker-icon-darkgreen { 75 | background-position: -252px 0; 76 | } 77 | 78 | .awesome-marker-icon-lightgreen { 79 | background-position: -432px 0; 80 | } 81 | 82 | .awesome-marker-icon-blue { 83 | background-position: -108px 0; 84 | } 85 | 86 | .awesome-marker-icon-darkblue { 87 | background-position: -216px 0; 88 | } 89 | 90 | .awesome-marker-icon-lightblue { 91 | background-position: -468px 0; 92 | } 93 | 94 | .awesome-marker-icon-purple { 95 | background-position: -144px 0; 96 | } 97 | 98 | .awesome-marker-icon-darkpurple { 99 | background-position: -288px 0; 100 | } 101 | 102 | .awesome-marker-icon-pink { 103 | background-position: -504px 0; 104 | } 105 | 106 | .awesome-marker-icon-cadetblue { 107 | background-position: -324px 0; 108 | } 109 | 110 | .awesome-marker-icon-white { 111 | background-position: -574px 0; 112 | } 113 | 114 | .awesome-marker-icon-gray { 115 | background-position: -648px 0; 116 | } 117 | 118 | .awesome-marker-icon-lightgray { 119 | background-position: -612px 0; 120 | } 121 | 122 | .awesome-marker-icon-black { 123 | background-position: -682px 0; 124 | } 125 | -------------------------------------------------------------------------------- /css/3rdparty/leaflet.css: -------------------------------------------------------------------------------- 1 | /* required styles */ 2 | 3 | .leaflet-map-pane, 4 | .leaflet-tile, 5 | .leaflet-marker-icon, 6 | .leaflet-marker-shadow, 7 | .leaflet-tile-pane, 8 | .leaflet-tile-container, 9 | .leaflet-overlay-pane, 10 | .leaflet-shadow-pane, 11 | .leaflet-marker-pane, 12 | .leaflet-popup-pane, 13 | .leaflet-overlay-pane svg, 14 | .leaflet-zoom-box, 15 | .leaflet-image-layer, 16 | .leaflet-layer { 17 | position: absolute; 18 | left: 0; 19 | top: 0; 20 | } 21 | .leaflet-container { 22 | overflow: hidden; 23 | -ms-touch-action: none; 24 | } 25 | .leaflet-tile, 26 | .leaflet-marker-icon, 27 | .leaflet-marker-shadow { 28 | -webkit-user-select: none; 29 | -moz-user-select: none; 30 | user-select: none; 31 | -webkit-user-drag: none; 32 | } 33 | .leaflet-marker-icon, 34 | .leaflet-marker-shadow { 35 | display: block; 36 | } 37 | /* map is broken in FF if you have max-width: 100% on tiles */ 38 | .leaflet-container img { 39 | max-width: none !important; 40 | } 41 | /* stupid Android 2 doesn't understand "max-width: none" properly */ 42 | .leaflet-container img.leaflet-image-layer { 43 | max-width: 15000px !important; 44 | } 45 | .leaflet-tile { 46 | filter: inherit; 47 | visibility: hidden; 48 | } 49 | .leaflet-tile-loaded { 50 | visibility: inherit; 51 | } 52 | .leaflet-zoom-box { 53 | width: 0; 54 | height: 0; 55 | } 56 | /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ 57 | .leaflet-overlay-pane svg { 58 | -moz-user-select: none; 59 | } 60 | 61 | .leaflet-tile-pane { z-index: 2; } 62 | .leaflet-objects-pane { z-index: 3; } 63 | .leaflet-overlay-pane { z-index: 4; } 64 | .leaflet-shadow-pane { z-index: 5; } 65 | .leaflet-marker-pane { z-index: 6; } 66 | .leaflet-popup-pane { z-index: 7; } 67 | 68 | .leaflet-vml-shape { 69 | width: 1px; 70 | height: 1px; 71 | } 72 | .lvml { 73 | behavior: url(#default#VML); 74 | display: inline-block; 75 | position: absolute; 76 | } 77 | 78 | 79 | /* control positioning */ 80 | 81 | .leaflet-control { 82 | position: relative; 83 | z-index: 7; 84 | pointer-events: auto; 85 | } 86 | .leaflet-top, 87 | .leaflet-bottom { 88 | position: absolute; 89 | z-index: 60; 90 | pointer-events: none; 91 | } 92 | .leaflet-top { 93 | top: 0; 94 | } 95 | .leaflet-right { 96 | right: 0; 97 | } 98 | .leaflet-bottom { 99 | bottom: 0; 100 | } 101 | .leaflet-left { 102 | left: 0; 103 | } 104 | .leaflet-control { 105 | float: left; 106 | clear: both; 107 | } 108 | .leaflet-right .leaflet-control { 109 | float: right; 110 | } 111 | .leaflet-top .leaflet-control { 112 | margin-top: 10px; 113 | } 114 | .leaflet-bottom .leaflet-control { 115 | margin-bottom: 10px; 116 | } 117 | .leaflet-left .leaflet-control { 118 | margin-left: 10px; 119 | } 120 | .leaflet-right .leaflet-control { 121 | margin-right: 10px; 122 | } 123 | 124 | 125 | /* zoom and fade animations */ 126 | 127 | .leaflet-fade-anim .leaflet-tile, 128 | .leaflet-fade-anim .leaflet-popup { 129 | opacity: 0; 130 | -webkit-transition: opacity 0.2s linear; 131 | -moz-transition: opacity 0.2s linear; 132 | -o-transition: opacity 0.2s linear; 133 | transition: opacity 0.2s linear; 134 | } 135 | .leaflet-fade-anim .leaflet-tile-loaded, 136 | .leaflet-fade-anim .leaflet-map-pane .leaflet-popup { 137 | opacity: 1; 138 | } 139 | 140 | .leaflet-zoom-anim .leaflet-zoom-animated { 141 | -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); 142 | -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); 143 | -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); 144 | transition: transform 0.25s cubic-bezier(0,0,0.25,1); 145 | } 146 | .leaflet-zoom-anim .leaflet-tile, 147 | .leaflet-pan-anim .leaflet-tile, 148 | .leaflet-touching .leaflet-zoom-animated { 149 | -webkit-transition: none; 150 | -moz-transition: none; 151 | -o-transition: none; 152 | transition: none; 153 | } 154 | 155 | .leaflet-zoom-anim .leaflet-zoom-hide { 156 | visibility: hidden; 157 | } 158 | 159 | 160 | /* cursors */ 161 | 162 | .leaflet-clickable { 163 | cursor: pointer; 164 | } 165 | .leaflet-container { 166 | cursor: -webkit-grab; 167 | cursor: -moz-grab; 168 | } 169 | .leaflet-popup-pane, 170 | .leaflet-control { 171 | cursor: auto; 172 | } 173 | .leaflet-dragging .leaflet-container, 174 | .leaflet-dragging .leaflet-clickable { 175 | cursor: move; 176 | cursor: -webkit-grabbing; 177 | cursor: -moz-grabbing; 178 | } 179 | 180 | 181 | /* visual tweaks */ 182 | 183 | .leaflet-container { 184 | background: #ddd; 185 | outline: 0; 186 | } 187 | .leaflet-container a { 188 | color: #0078A8; 189 | } 190 | .leaflet-container a.leaflet-active { 191 | outline: 2px solid orange; 192 | } 193 | .leaflet-zoom-box { 194 | border: 2px dotted #38f; 195 | background: rgba(255,255,255,0.5); 196 | } 197 | 198 | 199 | /* general typography */ 200 | .leaflet-container { 201 | font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; 202 | } 203 | 204 | 205 | /* general toolbar styles */ 206 | 207 | .leaflet-bar { 208 | box-shadow: 0 1px 5px rgba(0,0,0,0.65); 209 | border-radius: 4px; 210 | } 211 | .leaflet-bar a, 212 | .leaflet-bar a:hover { 213 | background-color: #fff; 214 | border-bottom: 1px solid #ccc; 215 | width: 26px; 216 | height: 26px; 217 | line-height: 26px; 218 | display: block; 219 | text-align: center; 220 | text-decoration: none; 221 | color: black; 222 | } 223 | .leaflet-bar a, 224 | .leaflet-control-layers-toggle { 225 | background-position: 50% 50%; 226 | background-repeat: no-repeat; 227 | display: block; 228 | } 229 | .leaflet-bar a:hover { 230 | background-color: #f4f4f4; 231 | } 232 | .leaflet-bar a:first-child { 233 | border-top-left-radius: 4px; 234 | border-top-right-radius: 4px; 235 | } 236 | .leaflet-bar a:last-child { 237 | border-bottom-left-radius: 4px; 238 | border-bottom-right-radius: 4px; 239 | border-bottom: none; 240 | } 241 | .leaflet-bar a.leaflet-disabled { 242 | cursor: default; 243 | background-color: #f4f4f4; 244 | color: #bbb; 245 | } 246 | 247 | .leaflet-touch .leaflet-bar a { 248 | width: 30px; 249 | height: 30px; 250 | line-height: 30px; 251 | } 252 | 253 | 254 | /* zoom control */ 255 | 256 | .leaflet-control-zoom-in, 257 | .leaflet-control-zoom-out { 258 | font: bold 18px 'Lucida Console', Monaco, monospace; 259 | text-indent: 1px; 260 | } 261 | .leaflet-control-zoom-out { 262 | font-size: 20px; 263 | } 264 | 265 | .leaflet-touch .leaflet-control-zoom-in { 266 | font-size: 22px; 267 | } 268 | .leaflet-touch .leaflet-control-zoom-out { 269 | font-size: 24px; 270 | } 271 | 272 | 273 | /* layers control */ 274 | 275 | .leaflet-control-layers { 276 | box-shadow: 0 1px 5px rgba(0,0,0,0.4); 277 | background: #fff; 278 | border-radius: 5px; 279 | } 280 | .leaflet-control-layers-toggle { 281 | background-image: url(../images/layers.png); 282 | width: 36px; 283 | height: 36px; 284 | } 285 | .leaflet-retina .leaflet-control-layers-toggle { 286 | background-image: url(../images/layers-2x.png); 287 | background-size: 26px 26px; 288 | } 289 | .leaflet-touch .leaflet-control-layers-toggle { 290 | width: 44px; 291 | height: 44px; 292 | } 293 | .leaflet-control-layers .leaflet-control-layers-list, 294 | .leaflet-control-layers-expanded .leaflet-control-layers-toggle { 295 | display: none; 296 | } 297 | .leaflet-control-layers-expanded .leaflet-control-layers-list { 298 | display: block; 299 | position: relative; 300 | } 301 | .leaflet-control-layers-expanded { 302 | padding: 6px 10px 6px 6px; 303 | color: #333; 304 | background: #fff; 305 | } 306 | .leaflet-control-layers-selector { 307 | margin-top: 2px; 308 | position: relative; 309 | top: 1px; 310 | } 311 | .leaflet-control-layers label { 312 | display: block; 313 | } 314 | .leaflet-control-layers-separator { 315 | height: 0; 316 | border-top: 1px solid #ddd; 317 | margin: 5px -10px 5px -6px; 318 | } 319 | 320 | 321 | /* attribution and scale controls */ 322 | 323 | .leaflet-container .leaflet-control-attribution { 324 | background: #fff; 325 | background: rgba(255, 255, 255, 0.7); 326 | margin: 0; 327 | } 328 | .leaflet-control-attribution, 329 | .leaflet-control-scale-line { 330 | padding: 0 5px; 331 | color: #333; 332 | } 333 | .leaflet-control-attribution a { 334 | text-decoration: none; 335 | } 336 | .leaflet-control-attribution a:hover { 337 | text-decoration: underline; 338 | } 339 | .leaflet-container .leaflet-control-attribution, 340 | .leaflet-container .leaflet-control-scale { 341 | font-size: 11px; 342 | } 343 | .leaflet-left .leaflet-control-scale { 344 | margin-left: 5px; 345 | } 346 | .leaflet-bottom .leaflet-control-scale { 347 | margin-bottom: 5px; 348 | } 349 | .leaflet-control-scale-line { 350 | border: 2px solid #777; 351 | border-top: none; 352 | line-height: 1.1; 353 | padding: 2px 5px 1px; 354 | font-size: 11px; 355 | white-space: nowrap; 356 | overflow: hidden; 357 | -moz-box-sizing: content-box; 358 | box-sizing: content-box; 359 | 360 | background: #fff; 361 | background: rgba(255, 255, 255, 0.5); 362 | } 363 | .leaflet-control-scale-line:not(:first-child) { 364 | border-top: 2px solid #777; 365 | border-bottom: none; 366 | margin-top: -2px; 367 | } 368 | .leaflet-control-scale-line:not(:first-child):not(:last-child) { 369 | border-bottom: 2px solid #777; 370 | } 371 | 372 | .leaflet-touch .leaflet-control-attribution, 373 | .leaflet-touch .leaflet-control-layers, 374 | .leaflet-touch .leaflet-bar { 375 | box-shadow: none; 376 | } 377 | .leaflet-touch .leaflet-control-layers, 378 | .leaflet-touch .leaflet-bar { 379 | border: 2px solid rgba(0,0,0,0.2); 380 | background-clip: padding-box; 381 | } 382 | 383 | 384 | /* popup */ 385 | 386 | .leaflet-popup { 387 | position: absolute; 388 | text-align: center; 389 | } 390 | .leaflet-popup-content-wrapper { 391 | padding: 1px; 392 | text-align: left; 393 | border-radius: 12px; 394 | } 395 | .leaflet-popup-content { 396 | margin: 13px 19px; 397 | line-height: 1.4; 398 | } 399 | .leaflet-popup-content p { 400 | margin: 18px 0; 401 | } 402 | .leaflet-popup-tip-container { 403 | margin: 0 auto; 404 | width: 40px; 405 | height: 20px; 406 | position: relative; 407 | overflow: hidden; 408 | } 409 | .leaflet-popup-tip { 410 | width: 17px; 411 | height: 17px; 412 | padding: 1px; 413 | 414 | margin: -10px auto 0; 415 | 416 | -webkit-transform: rotate(45deg); 417 | -moz-transform: rotate(45deg); 418 | -ms-transform: rotate(45deg); 419 | -o-transform: rotate(45deg); 420 | transform: rotate(45deg); 421 | } 422 | .leaflet-popup-content-wrapper, 423 | .leaflet-popup-tip { 424 | background: white; 425 | 426 | box-shadow: 0 3px 14px rgba(0,0,0,0.4); 427 | } 428 | .leaflet-container a.leaflet-popup-close-button { 429 | position: absolute; 430 | top: 0; 431 | right: 0; 432 | padding: 4px 4px 0 0; 433 | text-align: center; 434 | width: 18px; 435 | height: 14px; 436 | font: 16px/14px Tahoma, Verdana, sans-serif; 437 | color: #c3c3c3; 438 | text-decoration: none; 439 | font-weight: bold; 440 | background: transparent; 441 | } 442 | .leaflet-container a.leaflet-popup-close-button:hover { 443 | color: #999; 444 | } 445 | .leaflet-popup-scrolled { 446 | overflow: auto; 447 | border-bottom: 1px solid #ddd; 448 | border-top: 1px solid #ddd; 449 | } 450 | 451 | .leaflet-oldie .leaflet-popup-content-wrapper { 452 | zoom: 1; 453 | } 454 | .leaflet-oldie .leaflet-popup-tip { 455 | width: 24px; 456 | margin: 0 auto; 457 | 458 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; 459 | filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); 460 | } 461 | .leaflet-oldie .leaflet-popup-tip-container { 462 | margin-top: -1px; 463 | } 464 | 465 | .leaflet-oldie .leaflet-control-zoom, 466 | .leaflet-oldie .leaflet-control-layers, 467 | .leaflet-oldie .leaflet-popup-content-wrapper, 468 | .leaflet-oldie .leaflet-popup-tip { 469 | border: 1px solid #999; 470 | } 471 | 472 | 473 | /* div icon */ 474 | 475 | .leaflet-div-icon { 476 | background: #fff; 477 | border: 1px solid #666; 478 | } 479 | -------------------------------------------------------------------------------- /css/jquery.Jcrop.css: -------------------------------------------------------------------------------- 1 | /* jquery.Jcrop.css v0.9.12 - MIT License */ 2 | /* 3 | The outer-most container in a typical Jcrop instance 4 | If you are having difficulty with formatting related to styles 5 | on a parent element, place any fixes here or in a like selector 6 | 7 | You can also style this element if you want to add a border, etc 8 | A better method for styling can be seen below with .jcrop-light 9 | (Add a class to the holder and style elements for that extended class) 10 | */ 11 | .jcrop-holder { 12 | direction: ltr; 13 | text-align: left; 14 | } 15 | /* Selection Border */ 16 | .jcrop-vline, 17 | .jcrop-hline { 18 | background: #ffffff url("../img/Jcrop.gif"); 19 | font-size: 0; 20 | position: absolute; 21 | } 22 | .jcrop-vline { 23 | height: 100%; 24 | width: 1px !important; 25 | } 26 | .jcrop-vline.right { 27 | right: 0; 28 | } 29 | .jcrop-hline { 30 | height: 1px !important; 31 | width: 100%; 32 | } 33 | .jcrop-hline.bottom { 34 | bottom: 0; 35 | } 36 | /* Invisible click targets */ 37 | .jcrop-tracker { 38 | height: 100%; 39 | width: 100%; 40 | /* "turn off" link highlight */ 41 | -webkit-tap-highlight-color: transparent; 42 | /* disable callout, image save panel */ 43 | -webkit-touch-callout: none; 44 | /* disable cut copy paste */ 45 | -webkit-user-select: none; 46 | } 47 | /* Selection Handles */ 48 | .jcrop-handle { 49 | background-color: #333333; 50 | border: 1px #eeeeee solid; 51 | width: 7px; 52 | height: 7px; 53 | font-size: 1px; 54 | } 55 | .jcrop-handle.ord-n { 56 | left: 50%; 57 | margin-left: -4px; 58 | margin-top: -4px; 59 | top: 0; 60 | } 61 | .jcrop-handle.ord-s { 62 | bottom: 0; 63 | left: 50%; 64 | margin-bottom: -4px; 65 | margin-left: -4px; 66 | } 67 | .jcrop-handle.ord-e { 68 | margin-right: -4px; 69 | margin-top: -4px; 70 | right: 0; 71 | top: 50%; 72 | } 73 | .jcrop-handle.ord-w { 74 | left: 0; 75 | margin-left: -4px; 76 | margin-top: -4px; 77 | top: 50%; 78 | } 79 | .jcrop-handle.ord-nw { 80 | left: 0; 81 | margin-left: -4px; 82 | margin-top: -4px; 83 | top: 0; 84 | } 85 | .jcrop-handle.ord-ne { 86 | margin-right: -4px; 87 | margin-top: -4px; 88 | right: 0; 89 | top: 0; 90 | } 91 | .jcrop-handle.ord-se { 92 | bottom: 0; 93 | margin-bottom: -4px; 94 | margin-right: -4px; 95 | right: 0; 96 | } 97 | .jcrop-handle.ord-sw { 98 | bottom: 0; 99 | left: 0; 100 | margin-bottom: -4px; 101 | margin-left: -4px; 102 | } 103 | /* Dragbars */ 104 | .jcrop-dragbar.ord-n, 105 | .jcrop-dragbar.ord-s { 106 | height: 7px; 107 | width: 100%; 108 | } 109 | .jcrop-dragbar.ord-e, 110 | .jcrop-dragbar.ord-w { 111 | height: 100%; 112 | width: 7px; 113 | } 114 | .jcrop-dragbar.ord-n { 115 | margin-top: -4px; 116 | } 117 | .jcrop-dragbar.ord-s { 118 | bottom: 0; 119 | margin-bottom: -4px; 120 | } 121 | .jcrop-dragbar.ord-e { 122 | margin-right: -4px; 123 | right: 0; 124 | } 125 | .jcrop-dragbar.ord-w { 126 | margin-left: -4px; 127 | } 128 | /* The "jcrop-light" class/extension */ 129 | .jcrop-light .jcrop-vline, 130 | .jcrop-light .jcrop-hline { 131 | background: #ffffff; 132 | filter: alpha(opacity=70) !important; 133 | opacity: .70!important; 134 | } 135 | .jcrop-light .jcrop-handle { 136 | -moz-border-radius: 3px; 137 | -webkit-border-radius: 3px; 138 | background-color: #000000; 139 | border-color: #ffffff; 140 | border-radius: 3px; 141 | } 142 | /* The "jcrop-dark" class/extension */ 143 | .jcrop-dark .jcrop-vline, 144 | .jcrop-dark .jcrop-hline { 145 | background: #000000; 146 | filter: alpha(opacity=70) !important; 147 | opacity: 0.7 !important; 148 | } 149 | .jcrop-dark .jcrop-handle { 150 | -moz-border-radius: 3px; 151 | -webkit-border-radius: 3px; 152 | background-color: #ffffff; 153 | border-color: #000000; 154 | border-radius: 3px; 155 | } 156 | /* Simple macro to turn off the antlines */ 157 | .solid-line .jcrop-vline, 158 | .solid-line .jcrop-hline { 159 | background: #ffffff; 160 | } 161 | /* Fix for twitter bootstrap et al. */ 162 | .jcrop-holder img, 163 | img.jcrop-preview { 164 | max-width: none; 165 | } 166 | -------------------------------------------------------------------------------- /css/mobile.css: -------------------------------------------------------------------------------- 1 | /** 2 | * ownCloud - Pinit 3 | * 4 | * @author Sebastian Doell 5 | * @copyright 2014 sebastian doell sebastian@libasys.de 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE 9 | * License as published by the Free Software Foundation; either 10 | * version 3 of the License, or any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU AFFERO GENERAL PUBLIC LICENSE for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public 18 | * License along with this library. If not, see . 19 | * 20 | */ 21 | 22 | @media only screen and (max-width: 768px) { 23 | 24 | #body-user.appbody-pinit #controls{ 25 | background-color:transparent; 26 | margin-left:50px; 27 | } 28 | /* do not show Deleted Files on mobile, not optimized yet and button too long */ 29 | 30 | #body-user.appbody-pinit #app-navigation-toggle{ 31 | background-color:#fff; 32 | 33 | height:36px; 34 | margin-top:4px; 35 | } 36 | #body-user.appbody-pinit #app-navigation{ 37 | background-color:#fff; 38 | 39 | height:100%; 40 | width:250px; 41 | 42 | } 43 | 44 | #first-group{ 45 | position:fixed; 46 | left:0; 47 | top:45px; 48 | } 49 | #controls button.filterPins{ 50 | display:block; 51 | } 52 | 53 | /* proper notification area for multi line messages */ 54 | #notification-container { 55 | display: -webkit-box; 56 | display: -moz-box; 57 | display: -ms-flexbox; 58 | display: -webkit-flex; 59 | display: flex; 60 | } 61 | 62 | #pinContainerShow{ 63 | width:100%; 64 | left:0; 65 | margin-left:0; 66 | } 67 | #show-pin #innerRightShow{ 68 | display:none; 69 | 70 | } 71 | #show-pin { 72 | width:98%; 73 | left:5%; 74 | margin-left:auto; 75 | margin-right:auto; 76 | } 77 | 78 | #show-pin #innerLeftShow{ 79 | margin-left:auto; 80 | margin-right:auto; 81 | width:100%; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /css/public.css: -------------------------------------------------------------------------------- 1 | /** 2 | * ownCloud - Pinit 3 | * 4 | * @author Sebastian Doell 5 | * @copyright 2014 sebastian doell sebastian@libasys.de 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE 9 | * License as published by the Free Software Foundation; either 10 | * version 3 of the License, or any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU AFFERO GENERAL PUBLIC LICENSE for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public 18 | * License along with this library. If not, see . 19 | * 20 | */ 21 | 22 | body{ 23 | background:#ccc; 24 | } 25 | #body-public #header{ 26 | z-index:60; 27 | } 28 | #content-wrapper{ 29 | background:transparent; 30 | top:60px; 31 | padding:0; 32 | margin:0; 33 | } 34 | .info{ 35 | position:fixed; 36 | bottom:0; 37 | text-align:center; 38 | line-height:20px; 39 | display:block; 40 | width:100%; 41 | } 42 | body{ 43 | position:absolute; 44 | height:90%; 45 | width:100%; 46 | } 47 | 48 | #showPin-cancel{ 49 | top:0px; 50 | } 51 | #pinContainerShow{ 52 | position:absolute; 53 | padding:0; 54 | margin:0; 55 | display:block; 56 | top:10px; 57 | width:90%; 58 | left:48%; 59 | margin-left:-38%; 60 | text-align:center; 61 | background:transparent; 62 | height:auto; 63 | z-index:80; 64 | line-height:24px; 65 | 66 | } 67 | 68 | #pinlist{ 69 | top:0; 70 | 71 | 72 | } 73 | 74 | #header{ 75 | height:50px; 76 | } 77 | -------------------------------------------------------------------------------- /db/pinwalldao.php: -------------------------------------------------------------------------------- 1 | . 20 | * 21 | */ 22 | 23 | namespace OCA\Pinit\Db; 24 | 25 | use \OCP\IDb; 26 | use OCA\Pinit\PinWall; 27 | use \OCP\Share; 28 | 29 | class PinWallDAO { 30 | 31 | private $db; 32 | 33 | public function __construct(IDb $db) { 34 | $this->db = $db; 35 | 36 | } 37 | 38 | public function save($request){ 39 | 40 | $userid=\OCP\User::getUser(); 41 | 42 | $displayname=(isset($request['name']) ? filter_var($request['name'],FILTER_SANITIZE_STRING) :'' ); 43 | $active=(isset($request['active']) ? $request['active'] :0 ); 44 | $wallorder=(isset($request['wallorder']) ? $request['wallorder'] :0 ); 45 | $wallBG=(isset($request['wallbackground']) ? $request['wallbackground'] :0 ); 46 | $lastmodified=time(); 47 | 48 | $stmt = $this->db->prepareQuery( 'INSERT INTO `*PREFIX*pinit_walls` (`displayname`,`active`,`wallorder`,`wallbackground`,`lastmodifieddate`,`user_id`) VALUES(?,?,?,?,?,?)' ); 49 | $result = $stmt->execute(array($displayname,$active,$wallorder,$wallBG,$lastmodified,$userid)); 50 | 51 | $insertid = $this->db->getInsertId('*PREFIX*pinit_walls'); 52 | 53 | return $insertid; 54 | } 55 | 56 | public function update($request){ 57 | 58 | $userid=\OCP\User::getUser(); 59 | $displayname=(isset($request['name']) ? filter_var($request['name'],FILTER_SANITIZE_STRING) :'' ); 60 | $active=(isset($request['active']) ? $request['active'] :0 ); 61 | $wallorder=(isset($request['wallorder']) ? $request['wallorder'] :0 ); 62 | $wallBG=(isset($request['wallbackground']) ? $request['wallbackground'] :0 ); 63 | $lastmodified=time(); 64 | $wallId=$request['wall_id']; 65 | 66 | $stmt = $this->db->prepareQuery( 'UPDATE `*PREFIX*pinit_walls` SET `displayname` = ?,`active` = ?,`wallorder` = ?,`wallbackground` = ?,`lastmodifieddate` = ? WHERE `user_id` = ? AND `id` = ?' ); 67 | $result = $stmt->execute(array($displayname,$active,$wallorder,$wallBG,$lastmodified,$userid,$wallId)); 68 | 69 | return true; 70 | } 71 | 72 | public function delete($id){ 73 | $userid=\OCP\User::getUser(); 74 | 75 | $stmt = $this->db->prepareQuery( 'DELETE FROM `*PREFIX*pinit_walls` WHERE `user_id` = ? AND `id` = ?' ); 76 | $result = $stmt->execute(array($userid,$id)); 77 | 78 | 79 | Share::unshareAll('pinwall', 'pinwall-'.$id); 80 | 81 | 82 | 83 | return true; 84 | } 85 | 86 | public function getAll($user=''){ 87 | if($user=='') { 88 | $user=\OCP\User::getUser(); 89 | } 90 | $values = array($user); 91 | $stmt = $this->db->prepareQuery( 'SELECT `id`,`user_id`,`displayname`,`active`,`wallorder`,`wallbackground`,`lastmodifieddate` FROM `*PREFIX*pinit_walls` WHERE `user_id` = ? ORDER BY `wallorder` ASC'); 92 | $result = $stmt->execute($values); 93 | $aPinWalls = array(); 94 | while( $row = $result->fetchRow()) { 95 | $aPinWalls[]=$row; 96 | } 97 | 98 | if(is_array($aPinWalls)){ 99 | return $aPinWalls; 100 | } 101 | } 102 | 103 | public function getSingle($wallId, $shared = false){ 104 | $owner = \OCP\User::getUser(); 105 | $usersql=''; 106 | if($shared == true){ 107 | $values = array($wallId); 108 | }else{ 109 | $values = array($owner,$wallId); 110 | $usersql='`user_id` = ? AND '; 111 | } 112 | 113 | $stmt = $this->db->prepareQuery( 'SELECT `id`,`user_id`,`displayname`,`active`,`wallorder`,`wallbackground`,`lastmodifieddate` FROM `*PREFIX*pinit_walls` WHERE '.$usersql.' `id` = ?'); 114 | $result = $stmt->execute($values); 115 | $row = $result->fetchRow(); 116 | 117 | return $row; 118 | } 119 | 120 | public function getPinsCount($wallid, $shared = false){ 121 | 122 | $usersql=''; 123 | if($shared == true){ 124 | $usersql='`public` = ? AND '; 125 | $values = array(1,$wallid); 126 | }else{ 127 | $values = array($wallid); 128 | } 129 | 130 | $stmt = $this->db->prepareQuery( 'SELECT COUNT(`id`) AS COUNTPIN FROM `*PREFIX*pinit_pins` WHERE '.$usersql.' `wall_id` = ?'); 131 | $result = $stmt->execute($values); 132 | $row = $result->fetchRow(); 133 | 134 | return $row['COUNTPIN']; 135 | } 136 | 137 | 138 | /** 139 | * @NoAdminRequired 140 | */ 141 | public function updateSortOrder($request){ 142 | 143 | $userid=\OCP\User::getUser(); 144 | $wallorder=(isset($request['iOrder']) ? $request['iOrder'] :0 ); 145 | $lastmodified=time(); 146 | $wallId=$request['wallId']; 147 | 148 | $stmt = $this->db->prepareQuery( 'UPDATE `*PREFIX*pinit_walls` SET `wallorder` = ?, `lastmodifieddate` = ? WHERE `user_id` = ? AND `id` = ?' ); 149 | $result = $stmt->execute(array($wallorder,$lastmodified,$userid,$wallId)); 150 | 151 | return true; 152 | } 153 | 154 | } -------------------------------------------------------------------------------- /img/ArrowLeft.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/ArrowRight.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/Jcrop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/Jcrop.gif -------------------------------------------------------------------------------- /img/bg/edel-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/bg/edel-light.png -------------------------------------------------------------------------------- /img/bg/edel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/bg/edel.jpg -------------------------------------------------------------------------------- /img/bg/green_cup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/bg/green_cup.png -------------------------------------------------------------------------------- /img/bg/grey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/bg/grey.jpg -------------------------------------------------------------------------------- /img/bg/restaurant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/bg/restaurant.png -------------------------------------------------------------------------------- /img/bg/skulls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/bg/skulls.png -------------------------------------------------------------------------------- /img/bg/wall-dark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/bg/wall-dark.jpg -------------------------------------------------------------------------------- /img/bg/wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/bg/wood.png -------------------------------------------------------------------------------- /img/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/blank.gif -------------------------------------------------------------------------------- /img/contacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/contacts.png -------------------------------------------------------------------------------- /img/contacts.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/magnifier.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/marker.png -------------------------------------------------------------------------------- /img/media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/media.png -------------------------------------------------------------------------------- /img/move.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/new-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/new-red.png -------------------------------------------------------------------------------- /img/pinit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/pinit.png -------------------------------------------------------------------------------- /img/pinit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/pins/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/pins/blue.png -------------------------------------------------------------------------------- /img/pins/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/pins/green.png -------------------------------------------------------------------------------- /img/pins/pins.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/pins/pins.psd -------------------------------------------------------------------------------- /img/pins/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/pins/red.png -------------------------------------------------------------------------------- /img/pins/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/pins/yellow.png -------------------------------------------------------------------------------- /img/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/play.png -------------------------------------------------------------------------------- /img/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/img/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /js/3rdparty/Leaflet.EdgeMarker.js: -------------------------------------------------------------------------------- 1 | (function (L) { 2 | 'use strict'; 3 | 4 | L.EdgeMarker = L.Class.extend({ 5 | 6 | options: { 7 | radius: 12, 8 | weight: 1, 9 | color: 'green', 10 | fillColor: 'yellow', 11 | fillOpacity: 1 12 | }, 13 | 14 | initialize: function(options) { 15 | L.setOptions(this, options); 16 | }, 17 | 18 | addTo: function (map) { 19 | this._map = map; 20 | 21 | //add a method to get applicable features 22 | L.extend(map, { 23 | _getFeatures: function () { 24 | var out = []; 25 | for (var l in this._layers) { 26 | if(typeof this._layers[l].getLatLng !== 'undefined') { 27 | out.push(this._layers[l]); 28 | } 29 | } 30 | return out; 31 | } 32 | }); 33 | 34 | map.on('move', this._addEdgeMarkers, this); 35 | map.on('viewreset', this._addEdgeMarkers, this); 36 | 37 | this._addEdgeMarkers(); 38 | 39 | map.addLayer(this); 40 | 41 | return this; 42 | }, 43 | 44 | onAdd: function () {}, 45 | 46 | _borderMarkerLayer: undefined, 47 | 48 | _addEdgeMarkers: function () { 49 | if (typeof this._borderMarkerLayer === 'undefined') { 50 | this._borderMarkerLayer = new L.LayerGroup(); 51 | } 52 | this._borderMarkerLayer.clearLayers(); 53 | 54 | var features = this._map._getFeatures(); 55 | 56 | for(var i = 0; i < features.length; i++) { 57 | var currentMarkerPosition = this._map.latLngToContainerPoint( 58 | features[i].getLatLng()); 59 | var mapPixelBounds = this._map.getSize(); 60 | 61 | if(currentMarkerPosition.y < 0 || 62 | currentMarkerPosition.y > mapPixelBounds.y || 63 | currentMarkerPosition.x > mapPixelBounds.x || 64 | currentMarkerPosition.x < 0) { 65 | 66 | var y = currentMarkerPosition.y; 67 | if( currentMarkerPosition.y < 0 ) { 68 | y = 0; 69 | } else if (currentMarkerPosition.y > mapPixelBounds.y) { 70 | y = mapPixelBounds.y; 71 | } 72 | 73 | var x = currentMarkerPosition.x; 74 | if (currentMarkerPosition.x > mapPixelBounds.x) { 75 | x = mapPixelBounds.x; 76 | } else if ( currentMarkerPosition.x < 0) { 77 | x = 0; 78 | } 79 | 80 | L.circleMarker(this._map.containerPointToLatLng([x,y]), this.options) 81 | .addTo(this._borderMarkerLayer); 82 | } 83 | } 84 | if(!this._map.hasLayer(this._borderMarkerLayer)) { 85 | this._borderMarkerLayer.addTo(this._map); 86 | } 87 | } 88 | }); 89 | 90 | L.edgeMarker = function (options) { 91 | return new L.EdgeMarker(options); 92 | }; 93 | 94 | })(L); 95 | -------------------------------------------------------------------------------- /js/3rdparty/gridify.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by khanhnh on 13/09/2014. 3 | */ 4 | 'use strict'; 5 | (function (factory) { 6 | if (typeof define === 'function' && define.amd) { 7 | define(['jquery'], factory); 8 | } else { 9 | factory(jQuery); 10 | } 11 | }(function ($) { 12 | $.fn.extend({ 13 | imagesLoaded: function(cb) 14 | { 15 | 16 | // var images = $(this).find('img'); 17 | var images = []; 18 | var count = images.length; 19 | 20 | if (count == 0){ 21 | cb(); 22 | } 23 | for(var i = 0, length = images.length; i< length; i++){ 24 | var image = new Image(); 25 | $(image) 26 | .load(function(e){ 27 | $(this).hide(); 28 | count --; 29 | if (count == 0) { 30 | cb(); 31 | } 32 | $(this).fadeIn(); 33 | }) 34 | .error(function(e){ 35 | count --; 36 | if (count == 0) { 37 | cb(); 38 | } 39 | }) 40 | .attr('src',images[i].src); 41 | } 42 | 43 | 44 | }, 45 | gridify: function(options) { 46 | var $this = $(this), 47 | options = options || {}, 48 | indexOfSmallest = function (a) { 49 | var lowest = 0; 50 | for (var i = 1, length = a.length; i < length; i++) { 51 | if (a[i] < a[lowest]) lowest = i; 52 | } 53 | return lowest; 54 | }, 55 | render = function() 56 | { 57 | $this.css('position', 'relative'); 58 | var items = $this.find(options.srcNode), 59 | transition = (options.transition || 'all 0.5s ease') + ', height 0, width 0', 60 | width = $this.innerWidth(), 61 | item_margin = parseInt(options.margin || 0), 62 | item_width = parseInt(options.max_width || options.width || 220), 63 | column_count = Math.max(Math.floor(width/(item_width + item_margin)),1), 64 | left = column_count == 1 ? item_margin/2 : (width % (item_width + item_margin)) / 2, 65 | columns = []; 66 | 67 | if (options.max_width) { 68 | column_count = Math.ceil(width/(item_width + item_margin)); 69 | item_width = (width - column_count * item_margin - item_margin)/column_count; 70 | left = item_margin/2; 71 | } 72 | 73 | for (var i = 0; i < column_count; i++) { 74 | columns.push(0); 75 | } 76 | 77 | 78 | for(var i = 0, length = items.length; i< length; i++) 79 | { 80 | /* transition: transition, 81 | '-webkit-transition':transition, 82 | '-moz-transition':transition 83 | */ 84 | var $item = $(items[i]), idx = indexOfSmallest(columns); 85 | $item.css({ 86 | width: item_width, 87 | position: 'absolute', 88 | margin: item_margin/2, 89 | top: columns[idx] + item_margin/2, 90 | left: (item_width + item_margin) * idx + left, 91 | }); 92 | columns[idx] += $item.innerHeight() + item_margin; 93 | 94 | 95 | } 96 | 97 | }; 98 | 99 | $this.imagesLoaded(render); 100 | 101 | if (options.resizable) { 102 | var resize = $(window).bind("resize", render); 103 | $this.on('remove', resize.unbind); 104 | } 105 | } 106 | }); 107 | })); 108 | -------------------------------------------------------------------------------- /js/3rdparty/images/layers-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/js/3rdparty/images/layers-2x.png -------------------------------------------------------------------------------- /js/3rdparty/images/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/js/3rdparty/images/layers.png -------------------------------------------------------------------------------- /js/3rdparty/images/marker-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/js/3rdparty/images/marker-icon-2x.png -------------------------------------------------------------------------------- /js/3rdparty/images/marker-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/js/3rdparty/images/marker-icon.png -------------------------------------------------------------------------------- /js/3rdparty/images/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libasys/pinit/57b10765a653cc2407fc7c01a617e1221810c4bc/js/3rdparty/images/marker-shadow.png -------------------------------------------------------------------------------- /js/3rdparty/leaflet.awesome-markers.js: -------------------------------------------------------------------------------- 1 | /* 2 | Leaflet.AwesomeMarkers, a plugin that adds colorful iconic markers for Leaflet, based on the Font Awesome icons 3 | (c) 2012-2013, Lennard Voogdt 4 | 5 | http://leafletjs.com 6 | https://github.com/lvoogdt 7 | */ 8 | 9 | /*global L*/ 10 | 11 | (function (window, document, undefined) { 12 | "use strict"; 13 | /* 14 | * Leaflet.AwesomeMarkers assumes that you have already included the Leaflet library. 15 | */ 16 | 17 | L.AwesomeMarkers = {}; 18 | 19 | L.AwesomeMarkers.version = '2.0.1'; 20 | 21 | L.AwesomeMarkers.Icon = L.Icon.extend({ 22 | options: { 23 | iconSize: [35, 45], 24 | iconAnchor: [17, 42], 25 | popupAnchor: [1, -32], 26 | shadowAnchor: [10, 12], 27 | shadowSize: [36, 16], 28 | className: 'awesome-marker', 29 | prefix: 'glyphicon', 30 | spinClass: 'fa-spin', 31 | extraClasses: '', 32 | icon: 'home', 33 | markerColor: 'blue', 34 | iconColor: 'white' 35 | }, 36 | 37 | initialize: function (options) { 38 | options = L.Util.setOptions(this, options); 39 | }, 40 | 41 | createIcon: function () { 42 | var div = document.createElement('div'), 43 | options = this.options; 44 | 45 | if (options.icon) { 46 | div.innerHTML = this._createInner(); 47 | } 48 | 49 | if (options.bgPos) { 50 | div.style.backgroundPosition = 51 | (-options.bgPos.x) + 'px ' + (-options.bgPos.y) + 'px'; 52 | } 53 | 54 | this._setIconStyles(div, 'icon-' + options.markerColor); 55 | return div; 56 | }, 57 | 58 | _createInner: function() { 59 | var iconClass, iconSpinClass = "", iconColorClass = "", iconColorStyle = "", options = this.options; 60 | 61 | if(options.icon.slice(0,options.prefix.length+1) === options.prefix + "-") { 62 | iconClass = options.icon; 63 | } else { 64 | iconClass = options.prefix + "-" + options.icon; 65 | } 66 | 67 | if(options.spin && typeof options.spinClass === "string") { 68 | iconSpinClass = options.spinClass; 69 | } 70 | 71 | if(options.iconColor) { 72 | if(options.iconColor === 'white' || options.iconColor === 'black') { 73 | iconColorClass = "icon-" + options.iconColor; 74 | } else { 75 | iconColorStyle = "style='color: " + options.iconColor + "' "; 76 | } 77 | } 78 | 79 | return ""; 80 | }, 81 | 82 | _setIconStyles: function (img, name) { 83 | var options = this.options, 84 | size = L.point(options[name === 'shadow' ? 'shadowSize' : 'iconSize']), 85 | anchor; 86 | 87 | if (name === 'shadow') { 88 | anchor = L.point(options.shadowAnchor || options.iconAnchor); 89 | } else { 90 | anchor = L.point(options.iconAnchor); 91 | } 92 | 93 | if (!anchor && size) { 94 | anchor = size.divideBy(2, true); 95 | } 96 | 97 | img.className = 'awesome-marker-' + name + ' ' + options.className; 98 | 99 | if (anchor) { 100 | img.style.marginLeft = (-anchor.x) + 'px'; 101 | img.style.marginTop = (-anchor.y) + 'px'; 102 | } 103 | 104 | if (size) { 105 | img.style.width = size.x + 'px'; 106 | img.style.height = size.y + 'px'; 107 | } 108 | }, 109 | 110 | createShadow: function () { 111 | var div = document.createElement('div'); 112 | 113 | this._setIconStyles(div, 'shadow'); 114 | return div; 115 | } 116 | }); 117 | 118 | L.AwesomeMarkers.icon = function (options) { 119 | return new L.AwesomeMarkers.Icon(options); 120 | }; 121 | 122 | }(this, document)); 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /js/jquery.scrollTo.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery.ScrollTo 3 | * Copyright (c) 2007-2014 Ariel Flesler - afleslergmailcom | http://flesler.blogspot.com 4 | * Licensed under MIT 5 | * http://flesler.blogspot.com/2007/10/jqueryscrollto.html 6 | * @projectDescription Easy element scrolling using jQuery. 7 | * @author Ariel Flesler 8 | * @version 1.4.11 9 | */ 10 | 11 | ;(function(plugin) { 12 | // AMD Support 13 | if (typeof define === 'function' && define.amd) { 14 | define(['jquery'], plugin); 15 | } else { 16 | plugin(jQuery); 17 | } 18 | }(function($) { 19 | 20 | var $scrollTo = $.scrollTo = function( target, duration, settings ) { 21 | return $(window).scrollTo( target, duration, settings ); 22 | }; 23 | 24 | $scrollTo.defaults = { 25 | axis:'xy', 26 | duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1, 27 | limit:true 28 | }; 29 | 30 | // Returns the element that needs to be animated to scroll the window. 31 | // Kept for backwards compatibility (specially for localScroll & serialScroll) 32 | $scrollTo.window = function( scope ) { 33 | return $(window)._scrollable(); 34 | }; 35 | 36 | // Hack, hack, hack :) 37 | // Returns the real elements to scroll (supports window/iframes, documents and regular nodes) 38 | $.fn._scrollable = function() { 39 | return this.map(function() { 40 | var elem = this, 41 | isWin = !elem.nodeName || $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) != -1; 42 | 43 | if (!isWin) 44 | return elem; 45 | 46 | var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem; 47 | 48 | return /webkit/i.test(navigator.userAgent) || doc.compatMode == 'BackCompat' ? 49 | doc.body : 50 | doc.documentElement; 51 | }); 52 | }; 53 | 54 | $.fn.scrollTo = function( target, duration, settings ) { 55 | if (typeof duration == 'object') { 56 | settings = duration; 57 | duration = 0; 58 | } 59 | if (typeof settings == 'function') 60 | settings = { onAfter:settings }; 61 | 62 | if (target == 'max') 63 | target = 9e9; 64 | 65 | settings = $.extend( {}, $scrollTo.defaults, settings ); 66 | // Speed is still recognized for backwards compatibility 67 | duration = duration || settings.duration; 68 | // Make sure the settings are given right 69 | settings.queue = settings.queue && settings.axis.length > 1; 70 | 71 | if (settings.queue) 72 | // Let's keep the overall duration 73 | duration /= 2; 74 | settings.offset = both( settings.offset ); 75 | settings.over = both( settings.over ); 76 | 77 | return this._scrollable().each(function() { 78 | // Null target yields nothing, just like jQuery does 79 | if (target == null) return; 80 | 81 | var elem = this, 82 | $elem = $(elem), 83 | targ = target, toff, attr = {}, 84 | win = $elem.is('html,body'); 85 | 86 | switch (typeof targ) { 87 | // A number will pass the regex 88 | case 'number': 89 | case 'string': 90 | if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) { 91 | targ = both( targ ); 92 | // We are done 93 | break; 94 | } 95 | // Relative selector, no break! 96 | targ = $(targ,this); 97 | if (!targ.length) return; 98 | case 'object': 99 | // DOMElement / jQuery 100 | if (targ.is || targ.style) 101 | // Get the real position of the target 102 | toff = (targ = $(targ)).offset(); 103 | } 104 | 105 | var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset; 106 | 107 | $.each( settings.axis.split(''), function( i, axis ) { 108 | var Pos = axis == 'x' ? 'Left' : 'Top', 109 | pos = Pos.toLowerCase(), 110 | key = 'scroll' + Pos, 111 | old = elem[key], 112 | max = $scrollTo.max(elem, axis); 113 | 114 | if (toff) {// jQuery / DOMElement 115 | attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] ); 116 | 117 | // If it's a dom element, reduce the margin 118 | if (settings.margin) { 119 | attr[key] -= parseInt(targ.css('margin'+Pos)) || 0; 120 | attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 0; 121 | } 122 | 123 | attr[key] += offset[pos] || 0; 124 | 125 | if(settings.over[pos]) 126 | // Scroll to a fraction of its width/height 127 | attr[key] += targ[axis=='x'?'width':'height']() * settings.over[pos]; 128 | } else { 129 | var val = targ[pos]; 130 | // Handle percentage values 131 | attr[key] = val.slice && val.slice(-1) == '%' ? 132 | parseFloat(val) / 100 * max 133 | : val; 134 | } 135 | 136 | // Number or 'number' 137 | if (settings.limit && /^\d+$/.test(attr[key])) 138 | // Check the limits 139 | attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max ); 140 | 141 | // Queueing axes 142 | if (!i && settings.queue) { 143 | // Don't waste time animating, if there's no need. 144 | if (old != attr[key]) 145 | // Intermediate animation 146 | animate( settings.onAfterFirst ); 147 | // Don't animate this axis again in the next iteration. 148 | delete attr[key]; 149 | } 150 | }); 151 | 152 | animate( settings.onAfter ); 153 | 154 | function animate( callback ) { 155 | $elem.animate( attr, duration, settings.easing, callback && function() { 156 | callback.call(this, targ, settings); 157 | }); 158 | }; 159 | 160 | }).end(); 161 | }; 162 | 163 | // Max scrolling position, works on quirks mode 164 | // It only fails (not too badly) on IE, quirks mode. 165 | $scrollTo.max = function( elem, axis ) { 166 | var Dim = axis == 'x' ? 'Width' : 'Height', 167 | scroll = 'scroll'+Dim; 168 | 169 | if (!$(elem).is('html,body')) 170 | return elem[scroll] - $(elem)[Dim.toLowerCase()](); 171 | 172 | var size = 'client' + Dim, 173 | html = elem.ownerDocument.documentElement, 174 | body = elem.ownerDocument.body; 175 | 176 | return Math.max( html[scroll], body[scroll] ) 177 | - Math.min( html[size] , body[size] ); 178 | }; 179 | 180 | function both( val ) { 181 | return $.isFunction(val) || typeof val == 'object' ? val : { top:val, left:val }; 182 | }; 183 | 184 | // AMD requirement 185 | return $scrollTo; 186 | })); 187 | -------------------------------------------------------------------------------- /l10n/de.php: -------------------------------------------------------------------------------- 1 | "Neue Pinwand", 4 | "Name" => "Name", 5 | "Pinwall created success" => "Neue Pinwand erfolgreich erstellt", 6 | "Edit Pinwall" => "Pinwand bearbeiten", 7 | "No Pins found! Add a (+ Pin) to your pinwall!" => "Keine Pins vorhanden! Füge Deiner Pinnwand einen (+ Pin) hinzu!", 8 | "Pinwall update success" => "Pinwand erfolgreich aktualisiert", 9 | "Delete Pinwall?" => "Möchten Sie die Pinwall wirklich löschen?", 10 | "Delete Pinwall" => "Pinwand löschen", 11 | "Url format is not correct" => "Url Format ist fehlerhaft", 12 | "Name is missing" => "Der Name fehlt!", 13 | "Delete Pin?" => "Moechten Sie den Pin wirklich löschen?", 14 | "Delete Pin" => "Pin löschen", 15 | "You haven't the permission to change the status!" => "Sie haben keine Berechtigung den Status des Pins zu ändern!", 16 | "Public Pin" => "öffentlicher Pin", 17 | "Private Pin" => "privater Pin", 18 | "Status changed!" => "Status geändert!", 19 | "Sorting saved!" => "Sortierung gespeichert!", 20 | "Shared by " =>"Geteilt von ", 21 | "More info" => "Zusätzliche Infos", 22 | "Added: " => "Erstellt: ", 23 | "Modified: " => "Geändert: ", 24 | "Drag Image Here!" => "Bild per Drag & Drop einfügen!", 25 | "Error" => "Fehler", 26 | "Pin creating success!" => "Pin erfolgreich erstellt!", 27 | "Pin update success!" => "Pin erfolgreich bearbeitet", 28 | "Pinwall" => "Pinwand", 29 | "Pin" => "Pin", 30 | "All" => "Alle", 31 | "none" => "Ohne", 32 | "Public" => "Öffentlich", 33 | "Description" => "Beschreibung", 34 | "http://Url" => "http://Url", 35 | "Cancel" => "Abbrechen", 36 | "OK" => "OK", 37 | "Pin moved!" => "Pin erfolgreich verschoben", 38 | "Edit Pin" => "Pin bearbeiten", 39 | "New Pin" => "Neuen Pin erstellen", 40 | "Delete Pin" => "Pin löschen", 41 | "Street, Postalcode, City, Country" => "Straße, Plz, Ort, Land", 42 | "Filter by tag" => "Nach Tag filtern", 43 | "Add new Tags" => "Neuen Tag erstellen", 44 | "Add Tags" => "Tags hinzufügen", 45 | "Existing Tags" => "Vorhandene Tags", 46 | "Generating Preview Website, please wait ...!" => "Vorschau Webseite wird erstellt, bitte warten ...", 47 | "Generating Preview Website failed! Please try it later again!" => "Vorschaubild erstellen fehlgeschlagen, bitte versuchen Sie es in Kürze noch einmal!", 48 | "Please delete current Image!" => "Bitte löschen Sie das vorhandene Bild zuerst", 49 | "Close" => "Schließen", 50 | "Uploaded of" => "Hochgeladen von", 51 | "Published of" => "Veröffentlicht von", 52 | "At" => "Auf", 53 | "found" => "gefunden", 54 | "Autor" => "Verfasser", 55 | ); 56 | -------------------------------------------------------------------------------- /l10n/de_DE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "pinit", 3 | { 4 | "New Pinwall" : "Neue Pinwand", 5 | "Name" : "Name", 6 | "Pinwall created success" : "Neue Pinwand erfolgreich erstellt", 7 | "Edit Pinwall" : "Pinwand bearbeiten", 8 | "No Pins found! Add a (+ Pin) to your pinwall!" : "Keine Pins vorhanden! Füge Deiner Pinnwand einen (+ Pin) hinzu!", 9 | "Pinwall update success" : "Pinwand erfolgreich aktualisiert", 10 | "Delete Pinwall?" : "Möchten Sie die Pinwall wirklich löschen?", 11 | "Delete Pinwall" : "Pinwand löschen", 12 | "Url format is not correct" : "Url Format ist fehlerhaft", 13 | "Name is missing" : "Der Name fehlt!", 14 | "Delete Pin?" : "Moechten Sie den Pin wirklich löschen?", 15 | "Delete Pin" : "Pin löschen", 16 | "You haven't the permission to change the status!" : "Sie haben keine Berechtigung den Status des Pins zu ändern!", 17 | "Public Pin" : "öffentlicher Pin", 18 | "Private Pin" : "privater Pin", 19 | "Status changed!" : "Status geändert!", 20 | "Sorting saved!" : "Sortierung gespeichert!", 21 | "Shared by " :"Geteilt von ", 22 | "More info" : "Zusätzliche Infos", 23 | "Added: " : "Erstellt: ", 24 | "Modified: " : "Geändert: ", 25 | "Drag Image Here!" : "Bild per Drag & Drop einfügen!", 26 | "Error" : "Fehler", 27 | "Pin creating success!" : "Pin erfolgreich erstellt!", 28 | "Pin update success!" : "Pin erfolgreich bearbeitet", 29 | "Pinwall" : "Pinwand", 30 | "Pin" : "Pin", 31 | "All" : "Alle", 32 | "none" : "Ohne", 33 | "Public" : "Öffentlich", 34 | "Description" : "Beschreibung", 35 | "http://Url" : "http://Url", 36 | "Cancel" : "Abbrechen", 37 | "OK" : "OK", 38 | "Pin moved!" : "Pin erfolgreich verschoben", 39 | "Edit Pin" : "Pin bearbeiten", 40 | "New Pin" : "Neuen Pin erstellen", 41 | "Delete Pin" : "Pin löschen", 42 | "Street, Postalcode, City, Country" : "Straße, Plz, Ort, Land", 43 | "Filter by tag" : "Nach Tag filtern", 44 | "Add new Tags" : "Neuen Tag erstellen", 45 | "Add Tags" : "Tags hinzufügen", 46 | "Existing Tags" : "Vorhandene Tags", 47 | "Generating Preview Website, please wait ...!" : "Vorschau Webseite wird erstellt, bitte warten ...", 48 | "Generating Preview Website failed! Please try it later again!" : "Vorschaubild erstellen fehlgeschlagen, bitte versuchen Sie es in Kürze noch einmal!", 49 | "Please delete current Image!" : "Bitte löschen Sie das vorhandene Bild zuerst", 50 | "Close" : "Schließen", 51 | "Uploaded of" : "Hochgeladen von", 52 | "Published of" : "Veröffentlicht von", 53 | "At" : "Auf", 54 | "found" : "gefunden", 55 | "Autor" : "Verfasser", 56 | "all Pins loaded" : "Alle Pins geladen" 57 | }, 58 | "nplurals=2; plural=(n != 1);"); 59 | -------------------------------------------------------------------------------- /l10n/de_DE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "New Pinwall" : "Neue Pinwand", 3 | "Name" : "Name", 4 | "Pinwall created success" : "Neue Pinwand erfolgreich erstellt", 5 | "Edit Pinwall" : "Pinwand bearbeiten", 6 | "No Pins found! Add a (+ Pin) to your pinwall!" : "Keine Pins vorhanden! Füge Deiner Pinnwand einen (+ Pin) hinzu!", 7 | "Pinwall update success" : "Pinwand erfolgreich aktualisiert", 8 | "Delete Pinwall?" : "Möchten Sie die Pinwall wirklich löschen?", 9 | "Delete Pinwall" : "Pinwand löschen", 10 | "Url format is not correct" : "Url Format ist fehlerhaft", 11 | "Name is missing" : "Der Name fehlt!", 12 | "Delete Pin?" : "Moechten Sie den Pin wirklich löschen?", 13 | "Delete Pin" : "Pin löschen", 14 | "You haven't the permission to change the status!" : "Sie haben keine Berechtigung den Status des Pins zu ändern!", 15 | "Public Pin" : "öffentlicher Pin", 16 | "Private Pin" : "privater Pin", 17 | "Status changed!" : "Status geändert!", 18 | "Sorting saved!" : "Sortierung gespeichert!", 19 | "Shared by " :"Geteilt von ", 20 | "More info" : "Zusätzliche Infos", 21 | "Added: " : "Erstellt: ", 22 | "Modified: " : "Geändert: ", 23 | "Drag Image Here!" : "Bild per Drag & Drop einfügen!", 24 | "Error" : "Fehler", 25 | "Pin creating success!" : "Pin erfolgreich erstellt!", 26 | "Pin update success!" : "Pin erfolgreich bearbeitet", 27 | "Pinwall" : "Pinwand", 28 | "Pin" : "Pin", 29 | "All" : "Alle", 30 | "none" : "Ohne", 31 | "Public" : "Öffentlich", 32 | "Description" : "Beschreibung", 33 | "http://Url" : "http://Url", 34 | "Cancel" : "Abbrechen", 35 | "OK" : "OK", 36 | "Pin moved!" : "Pin erfolgreich verschoben", 37 | "Edit Pin" : "Pin bearbeiten", 38 | "New Pin" : "Neuen Pin erstellen", 39 | "Delete Pin" : "Pin löschen", 40 | "Street, Postalcode, City, Country" : "Straße, Plz, Ort, Land", 41 | "Filter by tag" : "Nach Tag filtern", 42 | "Add new Tags" : "Neuen Tag erstellen", 43 | "Add Tags" : "Tags hinzufügen", 44 | "Existing Tags" : "Vorhandene Tags", 45 | "Generating Preview Website, please wait ...!" : "Vorschau Webseite wird erstellt, bitte warten ...", 46 | "Generating Preview Website failed! Please try it later again!" : "Vorschaubild erstellen fehlgeschlagen, bitte versuchen Sie es in Kürze noch einmal!", 47 | "Please delete current Image!" : "Bitte löschen Sie das vorhandene Bild zuerst", 48 | "Close" : "Schließen", 49 | "Uploaded of" : "Hochgeladen von", 50 | "Published of" : "Veröffentlicht von", 51 | "At" : "Auf", 52 | "found" : "gefunden", 53 | "Autor" : "Verfasser", 54 | "seconds ago" : "Gerade eben", 55 | "_%n minute ago_::_%n minutes ago_" : ["Vor %n Minute","Vor %n Minuten"], 56 | "_%n hour ago_::_%n hours ago_" : ["Vor %n Stunde","Vor %n Stunden"], 57 | "today" : "Heute", 58 | "yesterday" : "Gestern", 59 | "_%n day ago_::_%n days ago_" : ["Vor %n Tag","Vor %n Tagen"], 60 | "last month" : "Letzten Monat", 61 | "_%n month ago_::_%n months ago_" : ["Vor %n Monat","Vor %n Monaten"], 62 | "last year" : "Letztes Jahr", 63 | "years ago" : "Vor Jahren" 64 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 65 | } -------------------------------------------------------------------------------- /l10n/de_DE.php: -------------------------------------------------------------------------------- 1 | "Neue Pinwand", 3 | "Name" => "Name", 4 | "Pinwall created success" => "Neue Pinwand erfolgreich erstellt", 5 | "Edit Pinwall" => "Pinwand bearbeiten", 6 | "No Pins found! Add a (+ Pin) to your pinwall!" => "Keine Pins vorhanden! Füge Deiner Pinnwand einen (+ Pin) hinzu!", 7 | "Pinwall update success" => "Pinwand erfolgreich aktualisiert", 8 | "Delete Pinwall?" => "Möchten Sie die Pinwall wirklich löschen?", 9 | "Delete Pinwall" => "Pinwand löschen", 10 | "Url format is not correct" => "Url Format ist fehlerhaft", 11 | "Name is missing" => "Der Name fehlt!", 12 | "Delete Pin?" => "Moechten Sie den Pin wirklich löschen?", 13 | "Delete Pin" => "Pin löschen", 14 | "You haven't the permission to change the status!" => "Sie haben keine Berechtigung den Status des Pins zu ändern!", 15 | "Public Pin" => "öffentlicher Pin", 16 | "Private Pin" => "privater Pin", 17 | "Status changed!" => "Status geändert!", 18 | "Sorting saved!" => "Sortierung gespeichert!", 19 | "Shared by " =>"Geteilt von ", 20 | "More info" => "Zusätzliche Infos", 21 | "Added: " => "Erstellt: ", 22 | "Modified: " => "Geändert: ", 23 | "Drag Image Here!" => "Bild per Drag & Drop einfügen!", 24 | "Error" => "Fehler", 25 | "Pin creating success!" => "Pin erfolgreich erstellt!", 26 | "Pin update success!" => "Pin erfolgreich bearbeitet", 27 | "Pinwall" => "Pinwand", 28 | "Pin" => "Pin", 29 | "All" => "Alle", 30 | "none" => "Ohne", 31 | "Public" => "Öffentlich", 32 | "Description" => "Beschreibung", 33 | "http://Url" => "http://Url", 34 | "Cancel" => "Abbrechen", 35 | "OK" => "OK", 36 | "Pin moved!" => "Pin erfolgreich verschoben", 37 | "Edit Pin" => "Pin bearbeiten", 38 | "New Pin" => "Neuen Pin erstellen", 39 | "Delete Pin" => "Pin löschen", 40 | "Street, Postalcode, City, Country" => "Straße, Plz, Ort, Land", 41 | "Filter by tag" => "Nach Tag filtern", 42 | "Add new Tags" => "Neuen Tag erstellen", 43 | "Add Tags" => "Tags hinzufügen", 44 | "Existing Tags" => "Vorhandene Tags", 45 | "Generating Preview Website, please wait ...!" => "Vorschau Webseite wird erstellt, bitte warten ...", 46 | "Generating Preview Website failed! Please try it later again!" => "Vorschaubild erstellen fehlgeschlagen, bitte versuchen Sie es in Kürze noch einmal!", 47 | "Please delete current Image!" => "Bitte löschen Sie das vorhandene Bild zuerst", 48 | "Close" => "Schließen", 49 | "Uploaded of" => "Hochgeladen von", 50 | "Published of" => "Veröffentlicht von", 51 | "At" => "Auf", 52 | "found" => "gefunden", 53 | "Autor" => "Verfasser", 54 | ); 55 | -------------------------------------------------------------------------------- /public.php: -------------------------------------------------------------------------------- 1 | . 20 | * 21 | */ 22 | 23 | if (\OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_links', 'yes') !== 'yes') { 24 | header('HTTP/1.0 404 Not Found'); 25 | $tmpl = new OCP\Template('', '404', 'guest'); 26 | $tmpl->printPage(); 27 | exit(); 28 | } 29 | 30 | $urlGenerator = \OC::$server->getURLGenerator(); 31 | $token = isset($_GET['t']) ? $_GET['t'] : ''; 32 | 33 | if($token !== '') { 34 | OCP\Response::redirect($urlGenerator->linkToRoute('pinit.public.index', array('token' => $token))); 35 | } else { 36 | header('HTTP/1.0 404 Not Found'); 37 | $tmpl = new OCP\Template('', '404', 'guest'); 38 | $tmpl->printPage(); 39 | exit(); 40 | } 41 | 42 | -------------------------------------------------------------------------------- /search/pinit.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | */ 19 | 20 | namespace OCA\Pinit\Search; 21 | 22 | /** 23 | * A found file 24 | */ 25 | class Pinit extends \OCP\Search\Result { 26 | 27 | /** 28 | * Type name; translated in templates 29 | * @var string 30 | */ 31 | public $type = 'pinit'; 32 | 33 | 34 | /** 35 | * Create a new file search result 36 | * @param array $data file data given by provider 37 | */ 38 | public function __construct(array $data = null) { 39 | 40 | $this->id = $data['id']; 41 | $this->name = $data['description']; 42 | $this->link = $data['link']; 43 | $this->icon ='ioc ioc-location'; 44 | 45 | 46 | } 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /search/provider.php: -------------------------------------------------------------------------------- 1 | . 17 | * 18 | */ 19 | 20 | namespace OCA\Pinit\Search; 21 | use OCA\Pinit\AppInfo\Application; 22 | 23 | /** 24 | * Provide search results from the 'calendar' app 25 | */ 26 | class Provider extends \OCP\Search\Provider { 27 | 28 | private $pinController; 29 | private $pinWallController; 30 | private $l10N; 31 | 32 | public function __construct() { 33 | $app = new Application(); 34 | $container = $app->getContainer(); 35 | $this->app = $app; 36 | $this->pinController = $container->query('PinController'); 37 | $this->pinWallController = $container->query('PinWallController'); 38 | $this->l10N = $container->query('L10N'); 39 | } 40 | 41 | /** 42 | * 43 | * @param string $query 44 | * @return \OCP\Search\Result 45 | */ 46 | function search($query) { 47 | $unescape = function($value) { 48 | return strtr($value, array('\,' => ',', '\;' => ';')); 49 | }; 50 | 51 | $searchresults = array(); 52 | $results = $this->pinController->searchProperties($query); 53 | 54 | foreach($results as $result) { 55 | 56 | $link = \OCP\Util::linkToRoute('pinit.page.index').'#' . $result['id']; 57 | 58 | $returnData['id']=$result['id']; 59 | $returnData['description']=$result['title']; 60 | $returnData['link']=$link; 61 | 62 | $results[]=new \OCA\Pinit\Search\Pinit($returnData); 63 | 64 | 65 | } 66 | return $results; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /templates/index.php: -------------------------------------------------------------------------------- 1 | 29 | 30 | 31 | 32 | 33 | 40 | 41 | 42 |
43 | 44 |
45 | 46 |
47 |
48 |
49 | 50 | 51 | 52 | 53 | 54 |
55 |
56 | 57 | $val){ 59 | if($key == 0) { 60 | $filter=''; 61 | }else{ 62 | $filter=''; 63 | } 64 | print_unescaped($filter); 65 | } 66 | ?> 67 | 68 |
69 | 70 |
71 |
72 |
73 |
74 |

t("Pinwalls")); ?>

75 | 76 |
    77 | 78 |

    79 | 80 |
      81 |
        82 |

        t("Existing Tags")); ?>

        83 |
        84 |
          85 |
          86 |
          87 |
          88 | 89 |
          90 | 91 | 96 |
          97 | 98 | 99 | 100 |
          101 |
          102 |
          103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /templates/part.cropphoto.php: -------------------------------------------------------------------------------- 1 | getCache()->hasKey($_['tmpkey'])) { 3 | 4 | $imgurl=''; 5 | ?> 6 | 7 |
          13 | 14 | 15 | 16 | 17 |
          18 | 19 | 20 | 21 | 22 | 23 | 24 |
          25 | 26 |
          27 | 28 | t('The temporary image has been removed from cache.')); 31 | } 32 | -------------------------------------------------------------------------------- /templates/pin.edit.php: -------------------------------------------------------------------------------- 1 |
          2 | 3 |
          4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | $val){ 27 | $checked=''; 28 | if($key==0){ 29 | $descr=$l -> t($val); 30 | }else{ 31 | $descr=''; 32 | } 33 | if($key==$_['choosenPinColor']){ 34 | $checked='checked'; 35 | } 36 | print_unescaped(' '.$descr); 37 | 38 | } 39 | ?> 40 |
          41 | class="regular-checkbox"> t("Public")); ?> 42 |
          43 | " value="" maxlength="300" id="pname" name="pname" /> 44 | 45 | " value="" id="plocation" name="plocation" /> 46 |
          47 |
          48 | 49 |
          50 | 51 | MetaInfo 52 | Screenshot 53 | Picture 54 | 55 | " value="" maxlength="300" id="purl" name="purl" /> 56 | 57 |
          58 |
          59 | 60 | 61 | 62 |
          63 | 69 |
          70 | 71 |
          72 |
          73 | Save Media'); 76 | } 77 | ?> 78 | 79 | 80 |
          81 |
            82 |
            83 | Marker Color: 84 | 85 | $val){ 87 | $checked=''; 88 | if($val==$_['markercolor']){ 89 | $checked='checked'; 90 | } 91 | $descr=''; 92 | if($key==4){ 93 | print_unescaped('
            '); 94 | } 95 | print_unescaped(' '.$descr); 96 | } 97 | ?>

            98 | Marker Motive : 99 | 100 | 112 | 113 |
            114 |
            115 |
            116 |
            117 | 118 |
            119 | 120 | 121 |
            122 |
            123 |
            124 |
            125 | -------------------------------------------------------------------------------- /templates/pin.new.php: -------------------------------------------------------------------------------- 1 |
            2 | 3 |
            4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | $val){ 25 | $checked=''; 26 | if($key==0){ 27 | $descr=$l -> t($val); 28 | $checked='checked'; 29 | }else{ 30 | $descr=''; 31 | } 32 | print_unescaped(' '.$descr); 33 | } 34 | ?> 35 |
            36 | t("Public")); ?> 37 | 38 |
            39 | " value="" maxlength="300" id="pname" name="pname" /> 40 | 41 | " value="" id="plocation" name="plocation" /> 42 | 43 |
            44 | 45 |
            46 | 47 | 48 | MetaInfo 49 | Screenshot 50 | Picture 51 | 52 | " value="" style="width:270px;" maxlength="300" id="purl" name="purl" /> 53 | 54 |
            55 |

            56 |
            57 | 58 | 59 |
            60 | 66 |
            67 | 68 |
            69 |
            70 |
              71 |
              72 | Marker Color: 73 | 74 | $val){ 76 | $checked=''; 77 | if($key==0){ 78 | $checked='checked'; 79 | } 80 | $descr=''; 81 | if($key==4){ 82 | print_unescaped('
              '); 83 | } 84 | print_unescaped(' '.$descr); 85 | } 86 | ?>

              87 | Marker Motive : 88 | 89 | 101 | 102 |
              103 |
              104 |
              105 |
              106 | 107 |
              108 | 109 | 110 |
              111 |
              112 |
              113 |
              -------------------------------------------------------------------------------- /templates/pin.show.php: -------------------------------------------------------------------------------- 1 |
              2 | 3 | 4 | 5 | 6 |

              7 | '); 11 | 12 | } 13 | if($_['mediaUrl'] != ''){ 14 | $mediaHeight=400; 15 | if($_['mediaSite'] == 'soundcloud'){ 16 | $mediaHeight=150; 17 | } 18 | print_unescaped(''); 19 | print_unescaped(' '.$l -> t("At").' '.$_['mediaDomain'].' '.$l -> t("found").''); 20 | } 21 | ?> 22 | 23 | 24 | 25 | 26 | 27 | 28 |
              29 |   30 |
              31 | 32 | 33 | 34 | 35 |
              36 | 37 | 38 | 39 |
              40 | t("Autor")); ?> 41 |
              42 |
              43 | '); 45 | } ?> 46 | '); 48 | } ?> 49 | '); 51 | } ?> 52 |
              53 | 54 | 55 | t("Pinwall")); ?>: 56 | 57 | 58 | t("Added: ")); ?> 59 | 60 | 61 | t("Modified: ")); ?> 62 | 63 | 64 | 65 | 66 | t("At")); ?> t("found")); ?> 67 | 68 | 69 | 70 | 71 | t("Uploaded of")); ?> 72 | 73 | 74 | 75 | 76 | t("Published of")); ?> 77 | 78 | 79 | 80 | '); 82 | foreach($_['tags'] as $tagInfo){ 83 | print_unescaped(''.$tagInfo['name'].''); 84 | } 85 | print_unescaped(''); 86 | } 87 | ?> 88 | 89 | 90 | 91 | 92 | 93 | 94 |
              95 | 96 |
              97 |
              98 | 99 | 100 | 101 |
              102 | 103 | 104 | 105 | 106 | 107 | 108 |
              109 | 110 | -------------------------------------------------------------------------------- /templates/public.php: -------------------------------------------------------------------------------- 1 | 17 | 18 |
              19 | 33 |
              34 |
              35 |
              36 |
              37 | 38 | 39 | 44 | 45 |
              46 | getLongFooter()); ?> 47 |
              48 | 49 | 50 | --------------------------------------------------------------------------------