This file contains hidden or 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
| module Paperclip | |
| class Watermark < Processor | |
| def initialize(file, options = {}, attachment = nil) | |
| super | |
| geometry = options[:geometry] | |
| @file = file | |
| @crop = geometry[-1,1] == '#' | |
| @target_geometry = Geometry.parse geometry | |
| @current_geometry = Geometry.from_file @file | |
| @convert_options = options[:convert_options] |
This file contains hidden or 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
| function timeSince(datum) { | |
| var razlika = (Date.now() - Date.parse(datum).getTime())/1000; | |
| var rezultat; | |
| if (razlika<60) { | |
| if (razlika == 1 || (razlika>20 && razlika%10==1)) { | |
| rezultat = "prije "+razlika+" sekundu"; | |
| } | |
| else if (razlika <= 4 || (razlika >20 && razlika%10<=4)) { | |
| rezultat = "prije "+razlika+" sekunde"; |