Merge branch 'develop' of github.com:martini/zammad into develop

This commit is contained in:
Felix Niklas 2015-06-24 14:29:35 +02:00
commit bd26aa9ebb
4 changed files with 12 additions and 10 deletions

View file

@ -44,10 +44,11 @@ class App.DashboardActivityStream extends App.Controller
items = @prepareForObjectList(items)
html = $('<div></div>')
html = $('<div class="activity-entries"></div>')
for item in items
html.append( @renderItem(item) )
@$('.activity-entries').remove()
@el.append html
# update time

View file

@ -1410,7 +1410,7 @@ class searchableSelectRef extends App.ControllerContent
name: 'project-name'
id: 'project-name-123'
placeholder: 'Enter Project Name'
options: [{"value":0,"name":"Appleasdfasdfasdjflkajhsdlfkjahsdlfkjahsdlkfjahsdlkfjahsldkfjahsldkjfahsldkjfh asdf lkajshdfl kajshdfl kajhsdflk ajhsdlfk jahsdlfk jahsdlfk jahsdlkfj ahsdlkfj ahsldkjfahskdjfh aslkdjfhal skdjfha lksdjfhalksdjhfal ksjdal kjsdhfakl sjdhafl jsdhf laskdjhfal ksjdhfal ksdjhfal kjsdhal kjsdhfl akjsdhf lhkj"},{"value":1,"name":"Microsoft","selected":true},{"value":2,"name":"Google"},{"value":3,"name":"Deutsche Bahn"},{"value":4,"name":"Sparkasse"},{"value":5,"name":"Deutsche &amp; Post"},{"value":6,"name":"Mitfahrzentrale"},{"value":7,"name":"Starbucks"},{"value":8,"name":"Mac Donalds"},{"value":9,"name":"Flixbus"},{"value":10,"name":"Betahaus"},{"value":11,"name":"Bruno Banani"},{"value":12,"name":"Alpina"},{"value":13,"name":"Samsung"},{"value":14,"name":"ChariTea"},{"value":15,"name":"fritz-kola"},{"value":16,"name":"Vitamin Water"},{"value":17,"name":"Znuny"}]
options: [{"value":0,"name":"Appleasdfasdfasdjflkajhsdlfkjahsdlfkjahsdlkfjahsdlkfjahsldkfjahsldkjfahsldkjfh asdf lkajshdfl kajshdfl kajhsdflk ajhsdlfk jahsdlfk jahsdlfk jahsdlkfj ahsdlkfj ahsldkjfahskdjfh aslkdjfhal skdjfha lksdjfhalksdjhfal ksjdal kjsdhfakl sjdhafl jsdhf laskdjhfal ksjdhfal ksdjhfal kjsdhal kjsdhfl akjsdhf lhkj"},{"value":1,"name":"Microsoft","selected":true},{"value":2,"name":"Google"},{"value":3,"name":"Deutsche Bahn"},{"value":4,"name":"Sparkasse"},{"value":5,"name":"Deutsche Post"},{"value":6,"name":"Mitfahrzentrale"},{"value":7,"name":"Starbucks"},{"value":8,"name":"Mac Donalds"},{"value":9,"name":"Flixbus"},{"value":10,"name":"Betahaus"},{"value":11,"name":"Bruno Banani"},{"value":12,"name":"Alpina"},{"value":13,"name":"Samsung"},{"value":14,"name":"ChariTea"},{"value":15,"name":"fritz-kola"},{"value":16,"name":"Vitamin Water"},{"value":17,"name":"Znuny"},{"value":18,"name":"Max & Moritz"}]
@html App.view('layout_ref/search_select')

View file

@ -23,6 +23,7 @@
<option>fritz-kola</option>
<option>Vitamin Water</option>
<option>Znuny</option>
<option>Max &amp; Moritz</option>
</select>
<svg class="icon-arrow-down"><use xlink:href="#icon-arrow-down" /></svg>
</div>

View file

@ -4,7 +4,7 @@ module Cache
delete a cache
Cache.delete( 'some_key' )
Cache.delete('some_key')
=end
@ -18,9 +18,9 @@ write a cache
Cache.write(
'some_key',
{ :some => { :data => { 'structure' } } },
{ some: { data: { 'structure' } } },
{
:expires_in => 24.hours, # optional
:expires_in => 24.hours, # optional, default 7 days
}
)
@ -28,10 +28,10 @@ write a cache
def self.write( key, data, params = {} )
if !params[:expires_in]
params[:expires_in] = 24.hours
params[:expires_in] = 7.days
end
begin
Rails.cache.write( key.to_s, data, params)
Rails.cache.write(key.to_s, data, params)
rescue => e
Rails.logger.error "NOTICE: #{e.message}"
end
@ -41,12 +41,12 @@ write a cache
get a cache
value = Cache.write( 'some_key' )
value = Cache.write('some_key')
=end
def self.get( key )
Rails.cache.read( key.to_s )
Rails.cache.read(key.to_s)
end
=begin
@ -59,7 +59,7 @@ clear whole cache store
def self.clear
# workaround, set test cache before clear whole cache, Rails.cache.clear complains about not existing cache dir
Cache.write( 'test', 1 )
Cache.write('test', 1)
Rails.cache.clear
end