List of commits:
Subject Hash Author Date (UTC)
Fixed wrong story displayed. 3cd77c19e80f7033031b23326a60ca53741915f7 DiAngelo 2015-12-17 16:28:35
Removed jQuery dependency 2d545dbb9dd48d98d9c10aa9775d4de3af081a3a DiAngelo 2015-12-17 14:12:30
Initial commit bd284e3f3dfaa733e7bae04258cad9173712569b DiAngelo 2015-12-17 12:44:38
Commit 3cd77c19e80f7033031b23326a60ca53741915f7 - Fixed wrong story displayed.
Author: DiAngelo
Author date (UTC): 2015-12-17 16:28
Committer name: DiAngelo
Committer date (UTC): 2015-12-17 16:28
Parent(s): 2d545dbb9dd48d98d9c10aa9775d4de3af081a3a
Signing key:
Tree: ba5966ff3b70285076d6d196946c5d375b599158
File Lines added Lines deleted
app/src/main/assets/css/page-content.css 3 1
app/src/main/assets/index.html 1 6
app/src/main/assets/js/com/mobile/books.rkr.js 16 15
app/src/main/assets/js/com/mobile/content.rkr.js 31 3
app/src/main/assets/js/com/mobile/webapp.rkr.js 0 3
app/src/main/java/ro/bitvice/cufarulcupovestiapk/FullscreenActivity.java 13 0
File app/src/main/assets/css/page-content.css changed (mode: 100644) (index 0028f62..1810406)
19 19 .oContent h1 .oContent h1
20 20 { {
21 21 font-size: 1.6em; font-size: 1.6em;
22 font-weight: bold;
22 23 } }
23 24 .oContent h3 .oContent h3
24 25 { {
 
37 38 .oContent h1, .oContent h1,
38 39 .oContent h2, .oContent h2,
39 40 .oContent h3, .oContent h3,
40 .oContent h4 {
41 .oContent h4,
42 .oContent small {
41 43 color: #e20000; color: #e20000;
42 44 text-align: center; text-align: center;
43 45 } }
File app/src/main/assets/index.html changed (mode: 100644) (index 69ea054..a7c165e)
28 28 <script src="js/rucker/mithril.js"></script> <script src="js/rucker/mithril.js"></script>
29 29 <script src="js/rucker/webfont.js"></script> <script src="js/rucker/webfont.js"></script>
30 30 <script src="js/rucker/rkr.js"></script> <script src="js/rucker/rkr.js"></script>
31 <script type='text/javascript'>
32 var require = {"baseUrl":"js/","deps":["js/index.js"]};
33
34 document.addEventListener('DOMContentLoaded', function() {
35 });
36 </script>
31 <script type='text/javascript'>var require = {"baseUrl":"js/","deps":["js/index.js"]};</script>
37 32 <script src="js/rucker/require.js"></script> <script src="js/rucker/require.js"></script>
38 33
39 34 </body> </body>
File app/src/main/assets/js/com/mobile/books.rkr.js changed (mode: 100644) (index ec6b95c..a810001)
... ... define([], function() {
22 22 comBooks.vm.init(); comBooks.vm.init();
23 23 comBooks.vm.set(args); comBooks.vm.set(args);
24 24
25 this.author = args.author;
26 this.books = args.books;
27 25 this.webApp = args.webApp; this.webApp = args.webApp;
28 26
29 27 this.onSelection = function (book) { this.onSelection = function (book) {
30 28 m.startComputation(); m.startComputation();
31 setTimeout(function () {
32 var author = comBooks.vm.author();
33 var contentPath = "js/data/authors/" + author.id + "/book_" + book.id + ".html";
29 var author = comBooks.vm.author();
30 var contentPath = "js/data/authors/" + author.id + "/book_" + book.id + ".html";
34 31
35 log.debug("contentPath:" + contentPath);
32 log.debug("contentPath:" + contentPath);
36 33
37 rkr.promise(contentPath, self.onContentLoaded, rkr.errorHandler);
34 rkr.promise(contentPath, function (data) {
35 self.onContentLoaded(data, book);
36 }, rkr.errorHandler);
38 37
39 }, 200);
40 38 }; };
41 39
42 this.onContentLoaded = function (data) {
43 var pageArguments = {
44 content: data
45 };
46
47 self.webApp.addPage({type: "content", active: true, arguments: pageArguments});
40 this.onContentLoaded = function (data, book) {
41 self.webApp.addPage({
42 type: "content",
43 active: true, arguments: {
44 content: data,
45 book: book,
46 author: comBooks.vm.author()
47 }
48 });
48 49 m.endComputation(); m.endComputation();
49 50 }; };
50 51
 
... ... define([], function() {
61 62 m('h1', 'Povești'), m('h1', 'Povești'),
62 63 m('small', 'de ' + args.author.name), m('small', 'de ' + args.author.name),
63 64 m('ul.mBooks', [ m('ul.mBooks', [
64 ctrl.books.map(function (book, index) {
65 comBooks.vm.books().map(function (book, index) {
65 66 var bookImage = 'images/books/' + book.id + '.jpg'; var bookImage = 'images/books/' + book.id + '.jpg';
66 67
67 68 return m('li.mBooks_item.oMedia', { return m('li.mBooks_item.oMedia', {
File app/src/main/assets/js/com/mobile/content.rkr.js changed (mode: 100644) (index f7dce8e..7c7f605)
... ... define([], function() {
8 8
9 9 var comContent = {}; var comContent = {};
10 10
11 (comContent.vm = function () {
12 var vm = {};
13
14 vm.init = function () {
15 vm.author = m.prop(null);
16 vm.book = m.prop(null);
17 vm.content = m.prop(null);
18
19 vm.set = function (args) {
20 vm.author(args.author);
21 vm.book(args.book);
22 vm.content(args.content);
23 };
24 };
25 return vm;
26 }());
27
11 28 comContent.controller = function(args) { comContent.controller = function(args) {
12 29 var self = this; var self = this;
13 30
14 this.content = args.content;
31 comContent.vm.init();
32 comContent.vm.set(args);
33
15 34 this.webApp = args.webApp; this.webApp = args.webApp;
16 35
17 36 this.onBack = function () { this.onBack = function () {
 
... ... define([], function() {
19 38 }; };
20 39 }; };
21 40
22 comContent.view = function(ctrl) {
41 comContent.view = function(ctrl, args) {
42 comContent.vm.set(args);
43
44 var mContent = m("section", {config: function(el, isInit) {
45 el.innerHTML = comContent.vm.content();
46 }});
47
23 48 return m('div', [ return m('div', [
24 49 m('span', {onclick: ctrl.onBack.bind(this)}, 'Back'), m('span', {onclick: ctrl.onBack.bind(this)}, 'Back'),
25 injectHTML(ctrl.content)
50 m('h1', comContent.vm.book().title),
51 m('small', "de " + comContent.vm.author().name),
52 m('p', injectHTML('&nbsp;')),
53 mContent
26 54 ]); ]);
27 55 }; };
28 56
File app/src/main/assets/js/com/mobile/webapp.rkr.js changed (mode: 100644) (index 5dcf79a..a524907)
... ... define([
22 22
23 23 vm.init = function () { vm.init = function () {
24 24 vm.list = []; vm.list = [];
25
26 25 vm.activePage = null; vm.activePage = null;
27
28 // vm.description = m.prop("");
29 26 vm.type = m.prop(""); vm.type = m.prop("");
30 27
31 28 vm.addPage = function (pageData) { vm.addPage = function (pageData) {
File app/src/main/java/ro/bitvice/cufarulcupovestiapk/FullscreenActivity.java changed (mode: 100644) (index 4d97070..a20a4ea)
... ... public class FullscreenActivity extends Activity {
90 90
91 91 } }
92 92
93 @Override
94 public boolean onKeyDown(int keyCode, KeyEvent event) {
95 // Check if the key event was the Back button and if there's history
96 if ((keyCode == KeyEvent.KEYCODE_BACK)) {
97 mWebView.loadUrl("javascript:prevPage()");
98 return true;
99 }
100 // If it wasn't the Back key or there's no web page history, bubble up to the default
101 // system behavior (probably exit the activity)
102 return super.onKeyDown(keyCode, event);
103 }
104
105
93 106 @Override @Override
94 107 protected void onPostCreate(Bundle savedInstanceState) { protected void onPostCreate(Bundle savedInstanceState) {
95 108 super.onPostCreate(savedInstanceState); super.onPostCreate(savedInstanceState);
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/bitvice/CufarulCuPovesti.apk

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/bitvice/CufarulCuPovesti.apk

Clone this repository using git:
git clone git://git.rocketgit.com/user/bitvice/CufarulCuPovesti.apk

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main