Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions deck/appinfo/app.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/**
* @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

$app = new \OCA\Deck\AppInfo\Application();
$app->registerNavigationEntry();
24 changes: 24 additions & 0 deletions deck/css/legacy.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

@import '../../../core/css/variables.scss';
@import 'style.scss';
1 change: 1 addition & 0 deletions deck/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 76 additions & 0 deletions deck/js/app/Run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
* @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

app.run(function ($document, $rootScope, $transitions, BoardService) {
'use strict';
$document.click(function (event) {
$rootScope.$broadcast('documentClicked', event);
});
$transitions.onEnter({from: 'list'}, function($state, $transition$) {
BoardService.unsetCurrrent();
});
$transitions.onEnter({to: 'list'}, function($state, $transition$) {
BoardService.unsetCurrrent();
document.title = "Deck - " + oc_defaults.name;
});
$transitions.onEnter({to: 'board.card'}, function ($state, $transition$) {
$rootScope.sidebar.show = true;
});
$transitions.onEnter({to: 'board.detail'}, function ($state, $transition$) {
$rootScope.sidebar.show = true;
});
$transitions.onEnter({to: 'board'}, function ($state) {
$rootScope.sidebar.show = false;
});
$transitions.onExit({from: 'board.card'}, function ($state) {
$rootScope.sidebar.show = false;
});
$transitions.onExit({from: 'board.detail'}, function ($state) {
$rootScope.sidebar.show = false;
});

$('link[rel="shortcut icon"]').attr(
'href',
OC.filePath('deck', 'img', 'app-512.png')
);

$('#app-navigation-toggle').off('click');
// App sidebar on mobile
var snapper = new Snap({
element: document.getElementById('app-content'),
disable: 'right',
maxPosition: 250,
minDragDistance: 100
});

$('#app-navigation-toggle').click(function(){
if($(window).width() > 768) {
$('#app-navigation').toggle('hidden');
} else {
if(snapper.state().state === 'left'){
snapper.close();
} else {
snapper.open('left');
}
}
});
});
61 changes: 61 additions & 0 deletions deck/js/vendor/angular-markdown-it/dist/ng-markdownit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
(function(window, angular) {
'use strict';
function markdownItProvider() {
var options = {};
var presetName = 'default';
var plugins = [];
function markdownItFactory(markdownIt) {
var md = markdownIt(presetName, options);
for (var i = 0; i < plugins.length; i += 1) {
md.use.apply(md, plugins[i]);
}
return md;
}
this.config = function configureOptions(preset, opts) {
if (angular.isString(preset) && angular.isObject(opts)) {
presetName = preset;
options = opts;
} else if (angular.isString(preset)) {
presetName = preset;
} else if (angular.isObject(preset)) {
options = preset;
}
};
this.use = function addPlugin(pluginObject) {
var options = Array.prototype.slice.call(arguments);
plugins.push(options);
return this;
};
this.$get = [ '$log', function($log) {
var constructor = window.markdownit || markdownit;
if (angular.isFunction(constructor)) {
return markdownItFactory(constructor);
}
$log.error('angular-markdown-it: markdown-it library not loaded.');
} ];
}
function markdownItDirective($sanitize, markdownIt) {
var attribute = 'markdownIt';
var render = function(value) {
return value ? $sanitize(markdownIt.render(value)) : '';
};
var link = function(scope, element, attrs) {
if (attrs[attribute]) {
scope.$watch(attribute, function(value) {
element.html(render(value));
});
} else {
element.html(render(element.text()));
}
};
return {
restrict: 'AE',
scope: {
markdownIt: '='
},
replace: true,
link: link
};
}
angular.module('mdMarkdownIt', [ 'ngSanitize' ]).provider('markdownItConverter', markdownItProvider).directive('markdownIt', [ '$sanitize', 'markdownItConverter', markdownItDirective ]);
})(window, window.angular);
Loading