-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/74-dropbox-issue
- Loading branch information
Showing
21 changed files
with
1,062 additions
and
829 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
define(function(require) { | ||
var Protoplast = require('protoplast'), | ||
ThemeController = require('theme/aw-bubble/controller/theme-controller'), | ||
ThemeModel = require('theme/aw-bubble/model/theme-model'); | ||
|
||
var MainInfoPresenter = Protoplast.Object.extend({ | ||
|
||
scriptModel: { | ||
inject: 'script' | ||
}, | ||
|
||
themeController: { | ||
inject: ThemeController | ||
}, | ||
|
||
themeModel: { | ||
inject: ThemeModel | ||
}, | ||
|
||
init: function() { | ||
Protoplast.utils.bind(this.scriptModel, 'script', function(){ | ||
this.themeController.setMainInfoComponent(null); | ||
}.bind(this)); | ||
|
||
Protoplast.utils.bind(this, 'themeModel.height', this.updateContentSize.bind(this)); | ||
Protoplast.utils.bind(this, 'themeModel.width', this.updateContentSize.bind(this)); | ||
}, | ||
|
||
updateContentSize: function() { | ||
this.view.left = (this.themeModel.width - this.view.outerWidth) / 2; | ||
} | ||
|
||
}); | ||
|
||
return MainInfoPresenter; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
define(function(require) { | ||
var Switcher = require('theme/aw-bubble/view/switcher'), | ||
BaseComponent = require('core/view/base-component'), | ||
MainInfoPresenter = require('core/presenter/main-info-presenter'); | ||
|
||
var MainInfo = BaseComponent.extend({ | ||
|
||
html: '<div class="appInfo">' + | ||
'<p><b>’afterwriting</b> turns <a href="https://fountain.io" target="_blank">.fountain</a> screenplays into beautiful PDFs. Free, open-source, offline-first. No registration, no ads, no fuss. ' + | ||
'<p>Start by using the menu above to <span data-comp="switchToInfo" class="switch" href="#"></span> or <span data-comp="switchToOpen" class="switch" href="#" section="open"></span>.</p>' + | ||
'<p style="padding-top: 30px"><a href="./privacy.html" target="_blank">Privacy Policy</a> | <a href="./terms.html" target="_blank">Terms of Service</a> | <a href="https://github.com/ifrost/afterwriting-labs" target="_blank">Source Code</a></p></p>' + | ||
'</div>', | ||
|
||
$meta: { | ||
presenter: MainInfoPresenter | ||
}, | ||
|
||
switchToInfo: { | ||
component: Switcher | ||
}, | ||
|
||
switchToOpen: { | ||
component: Switcher | ||
}, | ||
|
||
addInteractions: function() { | ||
this.switchToOpen.sectionName = 'open'; | ||
this.switchToOpen.title = "open a new file"; | ||
|
||
this.switchToInfo.sectionName = 'info'; | ||
this.switchToInfo.title = "get more details"; | ||
}, | ||
|
||
left: { | ||
set: function(value) { | ||
this.$root.offset({left: value}); | ||
}, | ||
get: function() { | ||
return this.$root && this.$root.offset().left; | ||
} | ||
}, | ||
|
||
outerWidth: { | ||
get: function() { | ||
return this.$root ? this.$root.outerWidth() : null; | ||
} | ||
}, | ||
|
||
}); | ||
|
||
return MainInfo; | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.