Skip to content

Commit

Permalink
Map Journal V1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregory L'Azou committed Nov 17, 2015
1 parent 9cc0a77 commit c8ab258
Show file tree
Hide file tree
Showing 255 changed files with 8,833 additions and 2,929 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Story Map Journal is ideal when you want to combine narrative text with maps
[Map Journal page on Esri Story Maps website](http://storymaps.arcgis.com/en/app-list/map-journal/) |
[Download](http://links.esri.com/storymaps/map_journal_template_zip)

**Latest release is version 1.5.0**, if you want to be informed of new releases, we recommend you to watch this repository ([see GitHub help](https://help.github.com/articles/watching-repositories)). See the [release page](https://github.com/Esri/map-journal-storytelling-template-js/releases) for release notes.
**Latest release is version 1.6.0**, if you want to be informed of new releases, we recommend you to watch this repository ([see GitHub help](https://help.github.com/articles/watching-repositories)). See the [release page](https://github.com/Esri/map-journal-storytelling-template-js/releases) for release notes.

## Help content

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Storymaps-MapJournal",
"version": "1.5.0",
"version": "1.6.0",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-clean": "~0.4.0",
Expand Down
1 change: 1 addition & 0 deletions src/app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ app.cfg = {

// Text to be used as the browser page title during app creation
TPL_NAME: "Map Journal",
TPL_ID: "mapjournal",
WEBAPP_TAG: ["Story Map", "Map Journal"],
WEBAPP_KEYWORD_GENERIC: ["JavaScript", "Map", "Mapping Site", "Online Map", "Ready To Use", "selfConfigured", "Web Map"],
WEBAPP_KEYWORD_APP: ["Story Map", "Story Maps", "MapJournal"],
Expand Down
4 changes: 4 additions & 0 deletions src/app/main-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ function defineDojoConfig()
['underscore', 'lib-build/lodash']
]
};

if (location.search.match(/locale=([\w\-]+)/)) {
window.dojoConfig.locale = RegExp.$1;
}
}

app.isProduction = false;
Expand Down
37 changes: 37 additions & 0 deletions src/app/storymaps/common/Core.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ audio {
position: relative;
width:100%;
height:100%;
-webkit-overflow-scrolling: touch;
}

.bingLogo-lg {
Expand Down Expand Up @@ -164,6 +165,28 @@ a:hover{
margin-left: 4px;
}

.small-loader {
display: inline-block;
width: 20px;
height: 20px;
background: url(../../../resources/tpl/viewer/icons/loading-light.gif);
background-size: 17px 20px;
background-repeat: no-repeat;
vertical-align: -5px;
margin-right: 2px;
}

/*
* My Stories
*/

#my-stories-hidden-container {
position: absolute;
bottom: -800px;
left: 0;
visibility: hidden;
}

/*
* Bootstrap override
*/
Expand All @@ -175,4 +198,18 @@ a:hover{
input[type="radio"],
input[type="checkbox"] {
margin: 4px 0 0;
}

/* looks like ugify is not happy and is not altering this since bootstrap 3.3.5 */
.btn .caret {
border-top: 4px dashed;
}

.dropup .btn .caret {
border-top: 0;
border-bottom: 4px dashed;
}

.claro .dijitTooltip {
box-sizing: initial;
}
24 changes: 20 additions & 4 deletions src/app/storymaps/common/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ define(["lib-build/css!lib-app/bootstrap/css/bootstrap.min",
"./utils/CommonHelper",
"esri/urlUtils",
// Builder
"./builder/BuilderHelper",
"./builder/MyStoriesWrapper",
// Utils
"dojo/has",
"esri/IdentityManager",
Expand Down Expand Up @@ -38,7 +38,7 @@ define(["lib-build/css!lib-app/bootstrap/css/bootstrap.min",
arcgisUtils,
CommonHelper,
urlUtils,
BuilderHelper,
MyStoriesWrapper,
has,
IdentityManager,
ArcGISOAuthInfo,
Expand Down Expand Up @@ -254,7 +254,7 @@ define(["lib-build/css!lib-app/bootstrap/css/bootstrap.min",
if ( ! builder )
portalLogin().then(initStep2);
else
initStep2();
portalLogin().then(initStep2);
},
function() {
// Not signed-in, redirecting to OAuth sign-in page
Expand Down Expand Up @@ -292,7 +292,7 @@ define(["lib-build/css!lib-app/bootstrap/css/bootstrap.min",
}

// Direct creation and not signed-in
if ( app.isDirectCreation && isProd() && ! CommonHelper.getPortalUser() ) {
if ( app.isDirectCreation && isProd() && ! (CommonHelper.getPortalUser() || app.portal.getPortalUser()) ) {
redirectToSignIn();
return;
}
Expand Down Expand Up @@ -358,6 +358,9 @@ define(["lib-build/css!lib-app/bootstrap/css/bootstrap.min",

if( owner )
ownerFound = $.inArray(owner, app.indexCfg.authorizedOwners) != -1;

if ( ! ownerFound && app.indexCfg.authorizedOwners[0] == "*" )
ownerFound = true;

if ( ! ownerFound ) {
initError("invalidConfigOwner");
Expand Down Expand Up @@ -516,6 +519,19 @@ define(["lib-build/css!lib-app/bootstrap/css/bootstrap.min",

_mainView.appInitComplete();
app.builder && app.builder.appInitComplete();

// Load My Stories in builder or viewer if user is owning the story
if ( app.isInBuilder || app.data.userIsAppOwner() ) {
if ( has("ff") ) {
$(".builderShare #my-stories-frame").remove();
}

if ( has("ff") || ! app.isInBuilder ) {
$("body").append('<div id="my-stories-hidden-container"><iframe id="my-stories-frame"></iframe></div>');
}

MyStoriesWrapper.loadMyStories();
}
}

function displayApp()
Expand Down
21 changes: 21 additions & 0 deletions src/app/storymaps/common/_resources/font/builder-share/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Font license info


## Elusive

Copyright (C) 2013 by Aristeides Stathopoulos

Author: Aristeides Stathopoulos
License: SIL (http://scripts.sil.org/OFL)
Homepage: http://aristeides.com/


## Font Awesome

Copyright (C) 2012 by Dave Gandy

Author: Dave Gandy
License: SIL ()
Homepage: http://fortawesome.github.com/Font-Awesome/


75 changes: 75 additions & 0 deletions src/app/storymaps/common/_resources/font/builder-share/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
This webfont is generated by http://fontello.com open source project.


================================================================================
Please, note, that you should obey original font licences, used to make this
webfont pack. Details available in LICENSE.txt file.

- Usually, it's enough to publish content of LICENSE.txt file somewhere on your
site in "About" section.

- If your project is open-source, usually, it will be ok to make LICENSE.txt
file publically available in your repository.

- Fonts, used in Fontello, don't require a clickable link on your site.
But any kind of additional authors crediting is welcome.
================================================================================


Comments on archive content
---------------------------

- /font/* - fonts in different formats

- /css/* - different kinds of css, for all situations. Should be ok with
twitter bootstrap. Also, you can skip <i> style and assign icon classes
directly to text elements, if you don't mind about IE7.

- demo.html - demo file, to show your webfont content

- LICENSE.txt - license info about source fonts, used to build your one.

- config.json - keeps your settings. You can import it back into fontello
anytime, to continue your work


Why so many CSS files ?
-----------------------

Because we like to fit all your needs :)

- basic file, <your_font_name>.css - is usually enough, it contains @font-face
and character code definitions

- *-ie7.css - if you need IE7 support, but still don't wish to put char codes
directly into html

- *-codes.css and *-ie7-codes.css - if you like to use your own @font-face
rules, but still wish to benefit from css generation. That can be very
convenient for automated asset build systems. When you need to update font -
no need to manually edit files, just override old version with archive
content. See fontello source code for examples.

- *-embedded.css - basic css file, but with embedded WOFF font, to avoid
CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain.
We strongly recommend to resolve this issue by `Access-Control-Allow-Origin`
server headers. But if you ok with dirty hack - this file is for you. Note,
that data url moved to separate @font-face to avoid problems with <IE9, when
string is too long.

- animate.css - use it to get ideas about spinner rotation animation.


Attention for server setup
--------------------------

You MUST setup server to reply with proper `mime-types` for font files -
otherwise some browsers will fail to show fonts.

Usually, `apache` already has necessary settings, but `nginx` and other
webservers should be tuned. Here is list of mime types for our file extensions:

- `application/vnd.ms-fontobject` - eot
- `application/x-font-woff` - woff
- `application/x-font-ttf` - ttf
- `image/svg+xml` - svg
40 changes: 40 additions & 0 deletions src/app/storymaps/common/_resources/font/builder-share/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "share-font",
"css_prefix_text": "share-",
"css_use_suffix": false,
"hinting": true,
"units_per_em": 1000,
"ascent": 850,
"glyphs": [
{
"uid": "12f4ece88e46abd864e40b35e05b11cd",
"css": "ok",
"code": 59395,
"src": "fontawesome"
},
{
"uid": "197375a3cea8cb90b02d06e4ddf1433d",
"css": "globe",
"code": 59397,
"src": "fontawesome"
},
{
"uid": "e36d581e4f2844db345bddc205d15dda",
"css": "group",
"code": 59392,
"src": "elusive"
},
{
"uid": "6ad86a953a5a76086c5568366863bbca",
"css": "torso",
"code": 59393,
"src": "elusive"
},
{
"uid": "c9bef3dc67fea47e94c4a5030ea64dad",
"css": "clipboard",
"code": 59394,
"src": "elusive"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
Animation example, for spinners
*/
.animate-spin {
-moz-animation: spin 2s infinite linear;
-o-animation: spin 2s infinite linear;
-webkit-animation: spin 2s infinite linear;
animation: spin 2s infinite linear;
display: inline-block;
}
@-moz-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}

100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-webkit-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}

100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-o-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}

100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-ms-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}

100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}

100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

.share-group:before { content: '\e800'; } /* '' */
.share-torso:before { content: '\e801'; } /* '' */
.share-clipboard:before { content: '\e802'; } /* '' */
.share-ok:before { content: '\e803'; } /* '' */
.share-globe:before { content: '\e805'; } /* '' */
Loading

0 comments on commit c8ab258

Please sign in to comment.