summaryrefslogtreecommitdiffstats
path: root/js/app/directives
diff options
context:
space:
mode:
Diffstat (limited to 'js/app/directives')
-rw-r--r--js/app/directives/audio.coffee43
-rw-r--r--js/app/directives/autofocus.coffee6
-rw-r--r--js/app/directives/bindunsafehtml.coffee26
-rw-r--r--js/app/directives/clickfocus.coffee44
-rw-r--r--js/app/directives/clickslidetoggle.coffee82
-rw-r--r--js/app/directives/draggable.coffee32
-rw-r--r--js/app/directives/droppable.coffee44
-rw-r--r--js/app/directives/forwardclick.coffee35
-rw-r--r--js/app/directives/itemshortcuts.coffee148
-rw-r--r--js/app/directives/newsclickscroll.coffee39
-rw-r--r--js/app/directives/newsitemscroll.coffee81
-rw-r--r--js/app/directives/pulltorefresh.coffee39
-rw-r--r--js/app/directives/readfile.coffee44
-rw-r--r--js/app/directives/tooltip.coffee27
-rw-r--r--js/app/directives/translate.coffee31
-rw-r--r--js/app/directives/undonotification.coffee60
16 files changed, 0 insertions, 781 deletions
diff --git a/js/app/directives/audio.coffee b/js/app/directives/audio.coffee
deleted file mode 100644
index 3d6d94062..000000000
--- a/js/app/directives/audio.coffee
+++ /dev/null
@@ -1,43 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-angular.module('News').directive 'newsAudio', ->
- directive =
- restrict: 'E'
- scope:
- src: '@'
- type: '@'
- transclude: true
- template: '' +
- '<audio controls="controls" preload="none" ng-hide="cantPlay()">' +
- '<source ng-src="{{ src|trustUrl }}">' +
- '</audio>' +
- '<a ng-href="{{ src|trustUrl }}" class="button" ng-show="cantPlay()" ' +
- 'ng-transclude></a>'
- link: (scope, elm, attrs) ->
- source = elm.children().children('source')[0]
- cantPlay = false
- source.addEventListener 'error', ->
- scope.$apply ->
- cantPlay = true
-
- scope.cantPlay = -> cantPlay
diff --git a/js/app/directives/autofocus.coffee b/js/app/directives/autofocus.coffee
deleted file mode 100644
index 98621b65f..000000000
--- a/js/app/directives/autofocus.coffee
+++ /dev/null
@@ -1,6 +0,0 @@
-angular.module('News').directive 'newsAutoFocus', ->
- directive =
- restrict: 'A'
- link: (scope, elm, attrs) ->
- $(window).load ->
- $(elm).focus()
diff --git a/js/app/directives/bindunsafehtml.coffee b/js/app/directives/bindunsafehtml.coffee
deleted file mode 100644
index 36240ad23..000000000
--- a/js/app/directives/bindunsafehtml.coffee
+++ /dev/null
@@ -1,26 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-angular.module('News').directive 'newsBindHtmlUnsafe', ->
- return (scope, element, attr) ->
- scope.$watch attr.newsBindHtmlUnsafe, (value) ->
- element.html(scope.$eval(attr.newsBindHtmlUnsafe))
diff --git a/js/app/directives/clickfocus.coffee b/js/app/directives/clickfocus.coffee
deleted file mode 100644
index 4a5323418..000000000
--- a/js/app/directives/clickfocus.coffee
+++ /dev/null
@@ -1,44 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-# Used to focus an element when you click on the element that this directive is
-# bound to
-# The selector attribute needs to defined, this element will be focused
-# If the timeout attribute is defined, it will focus the element after
-# after the passed miliseconds
-# Examlpe: <div oc-click-focus="{selector: '#app-content', timeout: 3000}">
-angular.module('News').directive 'ocClickFocus', ['$timeout', ($timeout) ->
-
- return (scope, elm, attr) ->
- options = scope.$eval(attr.ocClickFocus)
-
- if angular.isDefined(options) and angular.isDefined(options.selector)
- elm.click ->
- if angular.isDefined(options.timeout)
- $timeout ->
- $(options.selector).focus()
- , options.timeout
- else
- $(options.selector).focus()
-
-
-] \ No newline at end of file
diff --git a/js/app/directives/clickslidetoggle.coffee b/js/app/directives/clickslidetoggle.coffee
deleted file mode 100644
index e31c5e955..000000000
--- a/js/app/directives/clickslidetoggle.coffee
+++ /dev/null
@@ -1,82 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-
-
-# Used to slide up an area and can be customized by passing an expression.
-# If selector is defined, a different area is slid up on click
-# If hideOnFocusLost is defined, the slid up area will hide when the focus is
-# If cssClass is defined this class will be applied to the element
-# lost
-angular.module('News').directive 'ocClickSlideToggle',
-['$rootScope', ($rootScope) ->
-
- return (scope, elm, attr) ->
- options = scope.$eval(attr.ocClickSlideToggle)
-
- # get selected slide area
- if angular.isDefined(options) and angular.isDefined(options.selector)
- slideArea = $(options.selector)
- else
- slideArea = elm
-
- # get css class for element
- if angular.isDefined(options) and angular.isDefined(options.cssClass)
- cssClass = options.cssClass
- else
- cssClass = false
-
- elm.click ->
- if slideArea.is(':visible') and not slideArea.is(':animated')
- slideArea.slideUp()
- if cssClass != false
- elm.removeClass('opened')
- else
- slideArea.slideDown()
- if cssClass != false
- elm.addClass('opened')
-
- # if focus lost is set use broadcast to be sure that the currently
- # active element doesnt get slid up
- if angular.isDefined(options) and
- angular.isDefined(options.hideOnFocusLost) and
- options.hideOnFocusLost
- $(document.body).click ->
- $rootScope.$broadcast 'ocLostFocus'
-
- $rootScope.$on 'ocLostFocus', (scope, params) ->
- if params != slideArea
- if slideArea.is(':visible') and not slideArea.is(':animated')
- slideArea.slideUp()
-
- if cssClass != false
- elm.removeClass('opened')
-
- slideArea.click (e) ->
- $rootScope.$broadcast 'ocLostFocus', slideArea
- e.stopPropagation()
-
- elm.click (e) ->
- $rootScope.$broadcast 'ocLostFocus', slideArea
- e.stopPropagation()
-
-] \ No newline at end of file
diff --git a/js/app/directives/draggable.coffee b/js/app/directives/draggable.coffee
deleted file mode 100644
index 22fa041bf..000000000
--- a/js/app/directives/draggable.coffee
+++ /dev/null
@@ -1,32 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-# Wrapper for jquery ui draggable
-angular.module('News').directive 'ocDraggable', ->
-
- return (scope, elm, attr) ->
- options = scope.$eval(attr.ocDraggable)
-
- if angular.isDefined(options)
- elm.draggable(options)
- else
- elm.draggable()
diff --git a/js/app/directives/droppable.coffee b/js/app/directives/droppable.coffee
deleted file mode 100644
index 839f63009..000000000
--- a/js/app/directives/droppable.coffee
+++ /dev/null
@@ -1,44 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-angular.module('News').directive 'droppable', ['$rootScope', ($rootScope) ->
-
- return (scope, elm, attr) ->
- $elem = $(elm)
-
- details =
- accept: '.feed'
- hoverClass: 'drag-and-drop'
- greedy: true
- drop: (event, ui) ->
- # in case jquery ui did something weird
- $('.drag-and-drop').removeClass('drag-and-drop')
-
- data =
- folderId: parseInt($elem.data('id'), 10)
- feedId: parseInt($(ui.draggable).data('id'), 10)
-
- $rootScope.$broadcast('moveFeedToFolder', data)
- scope.$apply attr.droppable
-
- $elem.droppable(details)
-] \ No newline at end of file
diff --git a/js/app/directives/forwardclick.coffee b/js/app/directives/forwardclick.coffee
deleted file mode 100644
index d4fdac10a..000000000
--- a/js/app/directives/forwardclick.coffee
+++ /dev/null
@@ -1,35 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-
-# Used to forward clicks to another element via jquery selector
-# The expression which can be passed looks like this {selector:'#opml-upload'}
-# The element where to which the click was fowarded must not be a child element
-# otherwise this will end in endless recursion
-angular.module('News').directive 'ocForwardClick', ->
-
- return (scope, elm, attr) ->
- options = scope.$eval(attr.ocForwardClick)
-
- if angular.isDefined(options) and angular.isDefined(options.selector)
- $(elm).click ->
- $(options.selector).trigger('click')
diff --git a/js/app/directives/itemshortcuts.coffee b/js/app/directives/itemshortcuts.coffee
deleted file mode 100644
index 8eec1bf0a..000000000
--- a/js/app/directives/itemshortcuts.coffee
+++ /dev/null
@@ -1,148 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-angular.module('News').directive 'itemShortcuts', ['$window', ($window) ->
-
- return (scope, elm, attr) ->
-
- jumpTo = ($scrollArea, $item) ->
- position = $item.offset().top - $scrollArea.offset().top +
- $scrollArea.scrollTop()
- $scrollArea.scrollTop(position)
-
- jumpToPreviousItem = (scrollArea) ->
- $scrollArea = $(scrollArea)
- $items = $scrollArea.find('.feed_item')
- notJumped = true
- for item in $items
- $item = $(item)
- if $item.position().top >= 0
- $previous = $item.prev()
- # if there are no items before the current one
- if $previous.length > 0
- jumpTo($scrollArea, $previous)
-
- notJumped = false
- break
-
- # in case we didnt jump
- if $items.length > 0 and notJumped
- jumpTo($scrollArea, $items.last())
-
-
- jumpToNextItem = (scrollArea) ->
- $scrollArea = $(scrollArea)
- $items = $scrollArea.find('.feed_item')
- jumped = false
- for item in $items
- $item = $(item)
- if $item.position().top > 1
- jumped = true
- jumpTo($scrollArea, $item)
- break
- # in case this is the last item it should still scroll below the
- # top
- if jumped == false
- $scrollArea.scrollTop($scrollArea.prop('scrollHeight'))
-
-
- getCurrentItem = (scrollArea) ->
- $scrollArea = $(scrollArea)
- $items = $scrollArea.find('.feed_item')
- for item in $items
- $item = $(item)
- # 130px of the item should be visible
- if ($item.height() + $item.position().top) > 30
- return $item
-
-
- keepUnreadCurrentItem = (scrollArea) ->
- $item = getCurrentItem(scrollArea)
- $item.find('.keep_unread').trigger('click')
-
-
- starCurrentItem = (scrollArea) ->
- $item = getCurrentItem(scrollArea)
- $item.find('.item_utils .star').trigger('click')
-
- expandCurrentItem = (scrollArea) ->
- $item = getCurrentItem(scrollArea)
- $item.find('.item_heading a').trigger('click')
-
-
- openCurrentItem = (scrollArea) ->
- $item = getCurrentItem(scrollArea).find('.item_title a')
- $item.trigger('click')
- window.open($item.attr('href'), '_blank')
-
-
- $($window.document).keydown (e) ->
- # only activate if no input elements is focused
- focused = $(':focus')
-
- if not (focused.is('input') or
- focused.is('select') or
- focused.is('textarea') or
- focused.is('checkbox'))
-
- # activate shortcuts only if modifier keys are not pressed
- if not(e.shiftKey or e.altKey or e.ctrlKey or e.metaKey)
-
- scrollArea = elm
- # j or right or n
- if e.keyCode == 74 or e.keyCode == 39 or e.keyCode == 78
- e.preventDefault()
- jumpToNextItem(scrollArea)
-
- # k or left or p
- else if e.keyCode == 75 or e.keyCode == 37 or e.keyCode == 80
- e.preventDefault()
- jumpToPreviousItem(scrollArea)
-
- # u
- else if e.keyCode == 85
- e.preventDefault()
- keepUnreadCurrentItem(scrollArea)
-
- # e
- else if e.keyCode == 69
- e.preventDefault()
- expandCurrentItem(scrollArea)
-
- # s or i or l
- else if e.keyCode == 73 or e.keyCode == 83 or e.keyCode == 76
- e.preventDefault()
- starCurrentItem(scrollArea)
-
- # h
- else if e.keyCode == 72
- e.preventDefault()
- starCurrentItem(scrollArea)
- jumpToNextItem(scrollArea)
-
- # o
- else if e.keyCode == 79
- e.preventDefault()
- openCurrentItem(scrollArea)
-
-
-]
diff --git a/js/app/directives/newsclickscroll.coffee b/js/app/directives/newsclickscroll.coffee
deleted file mode 100644
index b85715506..000000000
--- a/js/app/directives/newsclickscroll.coffee
+++ /dev/null
@@ -1,39 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-angular.module('News').directive 'newsClickScroll', ['$timeout', ($timeout) ->
- return (scope, elm, attr) ->
- options = scope.$eval attr.newsClickScroll
- elm.click ->
- scrollArea = $(options.scrollArea)
- direction = options.direction
-
- # do this to execute after rendering
- $timeout ->
- if direction == 'top'
- scrollPosition = 0
- else
- scrollPosition = scrollArea.prop('scrollHeight')
-
- scrollArea.scrollTop(scrollPosition)
- , 10
-] \ No newline at end of file
diff --git a/js/app/directives/newsitemscroll.coffee b/js/app/directives/newsitemscroll.coffee
deleted file mode 100644
index 80929bd1d..000000000
--- a/js/app/directives/newsitemscroll.coffee
+++ /dev/null
@@ -1,81 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-scrolling = true
-markingRead = true
-
-angular.module('News').directive 'newsItemScroll', ['$rootScope', 'Config',
-($rootScope, Config) ->
-
- return (scope, elm, attr) ->
-
- elm.bind 'scroll', ->
- # prevent from doing to many scroll actions
- # the first timeout prevents accidental and too early marking as read
- if scrolling
- scrolling = false
- setTimeout ->
- scrolling = true
- , Config.ScrollTimeout
-
- # dont scroll if the value is set to false or there is already
- # a mark read request
- if markingRead and elm.attr('news-item-scroll') == 'true'
- markingRead = false
- setTimeout ->
- markingRead = true
- # only broadcast elements that are not already read
- # and that are beyond the top border
- $elems = elm.find('.feed_item:not(.read)')
-
- for feedItem in $elems
- offset = $(feedItem).position().top
- if offset <= -50
- id = parseInt($(feedItem).data('id'), 10)
- $rootScope.$broadcast 'readItem', id
-
- else
- break
-
- , Config.MarkReadTimeout
-
- # autopaging
- counter = 0
-
- # run from the bottom up to be performant
- for item in elm.find('.feed_item') by -1
-
- # if the counter is 10 it means that it didnt break to auto
- # page yet and that there are more than 10 items, so break
- if counter >= Config.autoPageFactor
- break
-
- # this is only reached when the item is not is below the top
- # and we didnt hit the factor yet so autopage and break
- if $(item).position().top < 0
- $rootScope.$broadcast 'autoPage'
- break
-
- counter += 1
-
-]
-
diff --git a/js/app/directives/pulltorefresh.coffee b/js/app/directives/pulltorefresh.coffee
deleted file mode 100644
index fff27517d..000000000
--- a/js/app/directives/pulltorefresh.coffee
+++ /dev/null
@@ -1,39 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-angular.module('News').directive 'newsPullToRefresh', ['$rootScope',
-($rootScope) ->
-
- allowed = true
- $rootScope.$on 'loadingNewItems', ->
- allowed = false
- $rootScope.$on 'loadedNewItems', ->
- allowed = true
-
- directive =
- restrict: 'A'
- link: (scope, elm, attrs) ->
- scrollTop = 0
- elm.scroll ->
- if @scrollTop == 0 && allowed
- scope.$apply attrs.newsPullToRefresh
-] \ No newline at end of file
diff --git a/js/app/directives/readfile.coffee b/js/app/directives/readfile.coffee
deleted file mode 100644
index fc5cc0c80..000000000
--- a/js/app/directives/readfile.coffee
+++ /dev/null
@@ -1,44 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-###
-This directive can be bound on an input element with type file
-When a file is input, the content will be passed to the given function as
-$fileContent parameter
-###
-angular.module('News').directive 'ocReadFile',
-['$rootScope', ($rootScope) ->
-
- return (scope, elm, attr) ->
- elm.change ->
-
- file = elm[0].files[0]
- reader = new FileReader()
-
- reader.onload = (e) ->
- elm[0].value = null
- scope.$fileContent = e.target.result
- scope.$apply attr.ocReadFile
-
- reader.readAsText(file)
-
-] \ No newline at end of file
diff --git a/js/app/directives/tooltip.coffee b/js/app/directives/tooltip.coffee
deleted file mode 100644
index 8241436e5..000000000
--- a/js/app/directives/tooltip.coffee
+++ /dev/null
@@ -1,27 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-# binds twitter tooltips to the element
-angular.module('News').directive 'ocTooltip', ->
-
- return (scope, elm, attr) ->
- elm.tooltip()
diff --git a/js/app/directives/translate.coffee b/js/app/directives/translate.coffee
deleted file mode 100644
index 29cb8153f..000000000
--- a/js/app/directives/translate.coffee
+++ /dev/null
@@ -1,31 +0,0 @@
-###
-
-ownCloud - News
-
-@author Bernhard Posselt
-@copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-License as published by the Free Software Foundation; either
-version 3 of the License, or any later version.
-
-This library 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 library. If not, see <http://www.gnu.org/licenses/>.
-
-###
-
-
-# Binds translated values to sc