inkwell_timelines 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.md +187 -0
- data/Rakefile +40 -0
- data/app/assets/images/inkwell_timelines/checkbox-checked.png +0 -0
- data/app/assets/images/inkwell_timelines/checkbox-unchecked.png +0 -0
- data/app/assets/images/inkwell_timelines/minus.png +0 -0
- data/app/assets/images/inkwell_timelines/plus.png +0 -0
- data/app/assets/images/inkwell_timelines/radiobutton_no.png +0 -0
- data/app/assets/images/inkwell_timelines/radiobutton_yes.png +0 -0
- data/app/assets/images/inkwell_timelines/up-down.png +0 -0
- data/app/assets/images/inkwell_timelines/wi-comment-hover.png +0 -0
- data/app/assets/images/inkwell_timelines/wi-comment.png +0 -0
- data/app/assets/images/inkwell_timelines/wi-favorite-active.png +0 -0
- data/app/assets/images/inkwell_timelines/wi-favorite-hover.png +0 -0
- data/app/assets/images/inkwell_timelines/wi-favorite.png +0 -0
- data/app/assets/images/inkwell_timelines/wi-reblog-active.png +0 -0
- data/app/assets/images/inkwell_timelines/wi-reblog-hover.png +0 -0
- data/app/assets/images/inkwell_timelines/wi-reblog.png +0 -0
- data/app/assets/javascripts/inkwell_timelines/index.js.erb +17 -0
- data/app/assets/javascripts/inkwell_timelines/inkwell_multi_selector.js +216 -0
- data/app/assets/javascripts/inkwell_timelines/inkwell_timeline.js.erb +149 -0
- data/app/assets/stylesheets/inkwell_timelines/index.css +30 -0
- data/app/assets/stylesheets/inkwell_timelines/multi_selector.css.erb +112 -0
- data/app/assets/stylesheets/inkwell_timelines/tab-menu.css +26 -0
- data/app/assets/stylesheets/inkwell_timelines/wall_item.css.erb +106 -0
- data/app/controllers/inkwell_timelines/application_controller.rb +4 -0
- data/app/helpers/inkwell_timelines/application_helper.rb +4 -0
- data/app/views/default_partials/_comment.html.erb +21 -0
- data/app/views/default_partials/_multi_selector.html.erb +15 -0
- data/app/views/default_partials/_multi_selector_items.html.erb +8 -0
- data/app/views/default_partials/_post.html.erb +22 -0
- data/app/views/default_partials/_tab_menu.html.erb +9 -0
- data/app/views/layouts/inkwell_timelines/application.html.erb +14 -0
- data/config/routes.rb +2 -0
- data/lib/inkwell_timelines.rb +6 -0
- data/lib/inkwell_timelines/engine.rb +5 -0
- data/lib/inkwell_timelines/version.rb +3 -0
- data/lib/main/to_controller.rb +22 -0
- data/lib/main/to_helpers.rb +93 -0
- data/lib/tasks/inkwell_timelines_tasks.rake +4 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +16 -0
- data/test/dummy/app/assets/javascripts/test.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +14 -0
- data/test/dummy/app/assets/stylesheets/test.css +4 -0
- data/test/dummy/app/controllers/application_controller.rb +9 -0
- data/test/dummy/app/controllers/test_controller.rb +5 -0
- data/test/dummy/app/controllers/timeline_controller.rb +11 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/test_helper.rb +2 -0
- data/test/dummy/app/models/blogline.rb +3 -0
- data/test/dummy/app/models/bloglines_categories.rb +3 -0
- data/test/dummy/app/models/category.rb +7 -0
- data/test/dummy/app/models/comment.rb +16 -0
- data/test/dummy/app/models/favoriteline.rb +3 -0
- data/test/dummy/app/models/post.rb +16 -0
- data/test/dummy/app/models/user.rb +109 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/test/show.html.erb +1 -0
- data/test/dummy/app/views/timeline/show.html.erb +1 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/inkwell_timelines.rb +42 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20130422111954_create_posts.rb +16 -0
- data/test/dummy/db/migrate/20130422112200_create_users.rb +10 -0
- data/test/dummy/db/migrate/20130422112350_create_comments.rb +16 -0
- data/test/dummy/db/migrate/20130422112504_create_bloglines.rb +13 -0
- data/test/dummy/db/migrate/20130422112804_create_favoritelines.rb +11 -0
- data/test/dummy/db/migrate/20130422112954_create_categories.rb +14 -0
- data/test/dummy/db/migrate/20130422113135_create_bloglines_categories.rb +12 -0
- data/test/dummy/db/schema.rb +92 -0
- data/test/dummy/db/seeds.rb +625 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +104306 -0
- data/test/dummy/log/test.log +815 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/spec/helpers/test_helper_spec.rb +8 -0
- data/test/dummy/spec/spec_helper.rb +52 -0
- data/test/dummy/spec/watir/autoload_spec.rb +33 -0
- data/test/dummy/spec/watir/main_spec.rb +80 -0
- data/test/dummy/spec/watir/selector_spec.rb +103 -0
- data/test/dummy/spec/watir/tab_menu_spec.rb +36 -0
- data/test/dummy/tmp/cache/assets/C56/8F0/sprockets%2F1ad046fb9937420d5382984483fc8401 +0 -0
- data/test/dummy/tmp/cache/assets/C63/420/sprockets%2F5daa64d9601a1dd14726112003d08364 +0 -0
- data/test/dummy/tmp/cache/assets/C65/790/sprockets%2Feacce513669090988829f66e61634451 +0 -0
- data/test/dummy/tmp/cache/assets/C77/DD0/sprockets%2F055f9cd12326c5150492b8c584314fa3 +0 -0
- data/test/dummy/tmp/cache/assets/C84/E70/sprockets%2F0530f24346bbf970634035b6e55f886e +0 -0
- data/test/dummy/tmp/cache/assets/C85/420/sprockets%2F4734da42d41574596ab532629d0867ec +0 -0
- data/test/dummy/tmp/cache/assets/C87/A50/sprockets%2F667342f892546b573c52d11f814ae4f3 +0 -0
- data/test/dummy/tmp/cache/assets/CA1/750/sprockets%2Fa8471b3ea18986e7368e8273a95865e8 +0 -0
- data/test/dummy/tmp/cache/assets/CAC/DB0/sprockets%2Fc424393ee4e4f66aa4014619048753cb +0 -0
- data/test/dummy/tmp/cache/assets/CB2/170/sprockets%2F4479eb189646408ec3130b45153ebf7b +0 -0
- data/test/dummy/tmp/cache/assets/CB9/630/sprockets%2Fe5952cc2ece61727517547af4232892e +0 -0
- data/test/dummy/tmp/cache/assets/CBD/960/sprockets%2F5a35c922c979e889b0338374a9b3f4b0 +0 -0
- data/test/dummy/tmp/cache/assets/CC4/730/sprockets%2F78d0941e0543313bbb0a9f0cf630030d +0 -0
- data/test/dummy/tmp/cache/assets/CD1/F50/sprockets%2Fbf2261613d1c32c54a6e38a7673531fa +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CD9/1E0/sprockets%2F293460f7bea2aea456231b769212f36f +0 -0
- data/test/dummy/tmp/cache/assets/CDC/EC0/sprockets%2Ff9a21d40846491577ab5ebe00de07077 +0 -0
- data/test/dummy/tmp/cache/assets/CE6/8D0/sprockets%2F9e823d2b49662dbb4389f2841a23e8c1 +0 -0
- data/test/dummy/tmp/cache/assets/CEE/110/sprockets%2Faf0654ff711843e082592cd70cf89a88 +0 -0
- data/test/dummy/tmp/cache/assets/CEE/490/sprockets%2F97139dc7ad35759531fc7fa572f0c761 +0 -0
- data/test/dummy/tmp/cache/assets/CF9/6F0/sprockets%2F952426cea414c6c2a04cc1216a1f36f5 +0 -0
- data/test/dummy/tmp/cache/assets/CFA/DE0/sprockets%2F25bf1e7766a300a4c37195df0cbb1107 +0 -0
- data/test/dummy/tmp/cache/assets/CFB/A10/sprockets%2F72699e3ed6f9c3984a718b62932ba66e +0 -0
- data/test/dummy/tmp/cache/assets/CFC/640/sprockets%2Fc7f89943cb904e76b2437e59348cc5c9 +0 -0
- data/test/dummy/tmp/cache/assets/D13/0C0/sprockets%2F218a6e24bfe5005a8a86798baa2585c8 +0 -0
- data/test/dummy/tmp/cache/assets/D13/3B0/sprockets%2F00cf5d507582a705af9694cde93ba186 +0 -0
- data/test/dummy/tmp/cache/assets/D13/6A0/sprockets%2F4819aa020210496ecf49ee70b78e8be6 +0 -0
- data/test/dummy/tmp/cache/assets/D15/560/sprockets%2Ff0007939832a29a27abe3a9579eed81c +0 -0
- data/test/dummy/tmp/cache/assets/D16/860/sprockets%2Fb45890d98668c132fee5cae4b15320d9 +0 -0
- data/test/dummy/tmp/cache/assets/D1A/150/sprockets%2F49ad9f8620b7712e6f2d4fc2e354e545 +0 -0
- data/test/dummy/tmp/cache/assets/D20/4F0/sprockets%2Fb15d3257899ad89007d1348eb9a5f5fe +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D36/810/sprockets%2Fb84416b6a4f5a39b0bc23ab72ad94279 +0 -0
- data/test/dummy/tmp/cache/assets/D39/390/sprockets%2F3c87a321da4296312f18efc704cd6d2f +0 -0
- data/test/dummy/tmp/cache/assets/D3A/260/sprockets%2F69551919ec05c0eb11e55bb59dc143ec +0 -0
- data/test/dummy/tmp/cache/assets/D41/350/sprockets%2F2111b16bc0081c14b803cfd350eb4baa +0 -0
- data/test/dummy/tmp/cache/assets/D43/D20/sprockets%2Fbcbf2f35591e507593ec6116eac6e924 +0 -0
- data/test/dummy/tmp/cache/assets/D48/3C0/sprockets%2F41be77d9f6b62168967ca14ccc6b51d6 +0 -0
- data/test/dummy/tmp/cache/assets/D4D/7C0/sprockets%2F5f4f24c2540cffe8b3c5e835756c35f7 +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D51/6A0/sprockets%2F80b05d6f75c78bdb1e450c898e47d97a +0 -0
- data/test/dummy/tmp/cache/assets/D56/4C0/sprockets%2F66059379b6c72ffe570f4ae394a89eda +0 -0
- data/test/dummy/tmp/cache/assets/D56/D30/sprockets%2Fe910c76d93fd4da6984d82e469f62f0c +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D65/600/sprockets%2Fdaa0e3c217673cb0ebb89d97438a1b80 +0 -0
- data/test/dummy/tmp/cache/assets/D66/6C0/sprockets%2Fa06355ade2a095c01afd8c6f5e67019d +0 -0
- data/test/dummy/tmp/cache/assets/D6A/E70/sprockets%2Fc9f71142e4d4a807cb6be80451f74adb +0 -0
- data/test/dummy/tmp/cache/assets/D76/E50/sprockets%2F6289e3eb865565eab3fdfb4fae810702 +0 -0
- data/test/dummy/tmp/cache/assets/D86/6A0/sprockets%2Fac97d7e4e37faa819a833c7c52c9e687 +0 -0
- data/test/dummy/tmp/cache/assets/D91/C00/sprockets%2Fb1cf6c48f161db0a058d10817ddd5e5b +0 -0
- data/test/dummy/tmp/cache/assets/D9C/C90/sprockets%2Fa903431f8703bbaafcae42e4f4692ff8 +0 -0
- data/test/dummy/tmp/cache/assets/DA0/C60/sprockets%2F90d8e40e6baa19d6556ab9c6ac891a2e +0 -0
- data/test/dummy/tmp/cache/assets/DA1/F90/sprockets%2F3bd196480867f8e3c74b10dbcbbe1f9b +0 -0
- data/test/dummy/tmp/cache/assets/DA7/EE0/sprockets%2Ffced4a1e089dc82bf773475da4e53c46 +0 -0
- data/test/dummy/tmp/cache/assets/DA9/4D0/sprockets%2F3d68828b990fbfa9cdf51daa76c242d5 +0 -0
- data/test/dummy/tmp/cache/assets/DB5/4C0/sprockets%2F5e815df4827231fe949b2f9bffd0d9de +0 -0
- data/test/dummy/tmp/cache/assets/DB6/910/sprockets%2F3c19b64141a5ceeccf3a3baf4c452a06 +0 -0
- data/test/dummy/tmp/cache/assets/DC4/8D0/sprockets%2Fd8daccd2ece841a83a2a584c50e352d5 +0 -0
- data/test/dummy/tmp/cache/assets/DCC/6A0/sprockets%2Fa92fb625cc83fe72fc4115e2fb2ed61e +0 -0
- data/test/dummy/tmp/cache/assets/DCC/940/sprockets%2Fe7f0ee8bf122b8b72b8e3c7cd13a5d81 +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E08/E50/sprockets%2F22c72aded517c5cdf8cce6f4b58c76b8 +0 -0
- data/test/dummy/tmp/cache/assets/E24/740/sprockets%2F2ecee9c0ae221af87da9c5d034c8dd0c +0 -0
- data/test/dummy/tmp/cache/assets/E2D/160/sprockets%2Fdb479da69eeed6322f3b8dab3bf91bb0 +0 -0
- data/test/dummy/tmp/cache/assets/E4C/810/sprockets%2Fdaf244418a8cfda1aca3e32dbdf17fd2 +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/screen/main.png +0 -0
- data/test/test_helper.rb +15 -0
- metadata +413 -0
@@ -0,0 +1,149 @@
|
|
1
|
+
var inkwell_timelines = {
|
2
|
+
config : {
|
3
|
+
data_loading : false,
|
4
|
+
no_more_data : false,
|
5
|
+
current_timestamp : null
|
6
|
+
},
|
7
|
+
|
8
|
+
formatDate : function (dateTime) {
|
9
|
+
var date = dateTime.getDate();
|
10
|
+
var month = dateTime.getMonth() + 1;
|
11
|
+
var hour = dateTime.getHours();
|
12
|
+
var mins = dateTime.getMinutes();
|
13
|
+
return (date < 10 ? ('0' + date) : date) + '.' + (month < 10 ? ('0' + month) : month) + '.' + dateTime.getFullYear() +
|
14
|
+
' ' + (hour < 10 ? ('0' + hour) : hour) + ':' + (mins < 10 ? ('0' + mins) : mins);
|
15
|
+
},
|
16
|
+
|
17
|
+
activeTimelineName : function () {
|
18
|
+
return inkwell_timelines.timelineName($('.inkwell_timelines .tab-menu .active'));
|
19
|
+
},
|
20
|
+
|
21
|
+
timelineName: function (timeline_obj) {
|
22
|
+
var timeline_name = null;
|
23
|
+
var classes = timeline_obj.attr('class').split(/\s+/);
|
24
|
+
$(classes).each(function () {
|
25
|
+
if (this.indexOf('timeline_') == 0) timeline_name = this.replace('timeline_', '');
|
26
|
+
});
|
27
|
+
return timeline_name;
|
28
|
+
},
|
29
|
+
|
30
|
+
timelineBlockName : function () {
|
31
|
+
return $('.inkwell_timelines').attr('id');
|
32
|
+
},
|
33
|
+
|
34
|
+
lastItemId : function () {
|
35
|
+
var id = $('.inkwell_timelines .wall_item').last().attr('id');
|
36
|
+
if (id) {
|
37
|
+
var splitted_id = id.split('_');
|
38
|
+
return splitted_id[splitted_id.length - 1]
|
39
|
+
}
|
40
|
+
return null;
|
41
|
+
},
|
42
|
+
|
43
|
+
transferredParams : function (timeline) {
|
44
|
+
return $('.inkwell_timelines input.transferred_params.' + timeline).attr('value');
|
45
|
+
},
|
46
|
+
|
47
|
+
selectorsValues : function () {
|
48
|
+
var selectors = $('.inkwell_timelines .inkwell_multi_selector');
|
49
|
+
var result = [];
|
50
|
+
selectors.each(function () {
|
51
|
+
if (!inkwell_multi_selector.is_all_checked($('.inkwell_timelines .inkwell_multi_selector'))) {
|
52
|
+
var data = {};
|
53
|
+
data['name'] = inkwell_multi_selector.get_selector_name($(this));
|
54
|
+
data['data'] = inkwell_multi_selector.top_checked_checkboxes_ids($(this));
|
55
|
+
result.push(data);
|
56
|
+
}
|
57
|
+
});
|
58
|
+
return (result.length > 0 ? result : null);
|
59
|
+
},
|
60
|
+
|
61
|
+
getData : function (current_timeline, include_selectors) {
|
62
|
+
var timestamp = $.now();
|
63
|
+
inkwell_timelines.config.current_timestamp = timestamp;
|
64
|
+
$.ajax({
|
65
|
+
url: '<%= InkwellTimelines::Engine::config.autoload_path%>',
|
66
|
+
type: 'POST',
|
67
|
+
dataType: 'html',
|
68
|
+
data: JSON.stringify({ block_name: inkwell_timelines.timelineBlockName(),
|
69
|
+
timeline: current_timeline,
|
70
|
+
last_item_id: inkwell_timelines.lastItemId(),
|
71
|
+
transferred_params: inkwell_timelines.transferredParams(current_timeline),
|
72
|
+
selectors_values: inkwell_timelines.selectorsValues(),
|
73
|
+
include_selectors: include_selectors
|
74
|
+
}),
|
75
|
+
success: function (data) {
|
76
|
+
if (timestamp == inkwell_timelines.config.current_timestamp) inkwell_timelines.buildTimeline(data);
|
77
|
+
},
|
78
|
+
complete: function () {
|
79
|
+
inkwell_timelines.config.data_loading = false;
|
80
|
+
}
|
81
|
+
});
|
82
|
+
},
|
83
|
+
|
84
|
+
buildTimeline : function (data) {
|
85
|
+
if (data == "") {
|
86
|
+
inkwell_timelines.config.no_more_data = true;
|
87
|
+
return;
|
88
|
+
}
|
89
|
+
$('.inkwell_timelines').append(data);
|
90
|
+
inkwell_timelines.formDate();
|
91
|
+
|
92
|
+
},
|
93
|
+
|
94
|
+
formDate : function () {
|
95
|
+
$('.inkwell_timelines .date:hidden').each(function () {
|
96
|
+
$(this).text(inkwell_timelines.formatDate(new Date(parseInt($(this).text()))));
|
97
|
+
$(this).removeAttr('style');
|
98
|
+
});
|
99
|
+
},
|
100
|
+
|
101
|
+
removeTimelineData: function (include_selectors) {
|
102
|
+
inkwell_timelines.config.no_more_data = false;
|
103
|
+
if (include_selectors) $('.inkwell_timelines .inkwell_multi_selector').remove();
|
104
|
+
$('.inkwell_timelines .wall_item').remove();
|
105
|
+
},
|
106
|
+
|
107
|
+
timelineClickHandler: function (timeline_obj) {
|
108
|
+
inkwell_timelines.config.data_loading = true;
|
109
|
+
inkwell_timelines.removeTimelineData(true);
|
110
|
+
if (!timeline_obj.hasClass('active')) {
|
111
|
+
$('.inkwell_timelines .tab-menu .active').removeClass('active');
|
112
|
+
timeline_obj.addClass('active');
|
113
|
+
}
|
114
|
+
inkwell_timelines.getData(inkwell_timelines.timelineName(timeline_obj), true);
|
115
|
+
},
|
116
|
+
|
117
|
+
selectorChangedHandler: function (selector) {
|
118
|
+
inkwell_timelines.config.data_loading = true;
|
119
|
+
inkwell_timelines.removeTimelineData(false);
|
120
|
+
var timeline_obj = $('.inkwell_timelines .tab-menu .active')[0];
|
121
|
+
inkwell_timelines.getData(inkwell_timelines.timelineName($(timeline_obj)), false);
|
122
|
+
}
|
123
|
+
};
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
$(document).ready(function () {
|
128
|
+
inkwell_timelines.formDate();
|
129
|
+
|
130
|
+
$(window).on('scroll', function(e) {
|
131
|
+
inkwell_multi_selector.hide_popup();
|
132
|
+
var scrHP = $(".inkwell_timelines").height() + $('.inkwell_timelines').offset().top;
|
133
|
+
var scrH2 = $(this).height() + $(this).scrollTop();
|
134
|
+
if (scrHP - scrH2 < <%= InkwellTimelines::Engine::config.load_distance%>) {
|
135
|
+
if (!(inkwell_timelines.config.data_loading || inkwell_timelines.config.no_more_data)) {
|
136
|
+
inkwell_timelines.config.data_loading = true;
|
137
|
+
inkwell_timelines.getData(inkwell_timelines.activeTimelineName(), false);
|
138
|
+
}
|
139
|
+
}
|
140
|
+
});
|
141
|
+
|
142
|
+
$('.inkwell_timelines .tab-menu').on('click', 'span', function () {
|
143
|
+
inkwell_timelines.timelineClickHandler($(this));
|
144
|
+
});
|
145
|
+
|
146
|
+
$(document).on('state_changed', '.inkwell_multi_selector', function () {
|
147
|
+
inkwell_timelines.selectorChangedHandler($(this));
|
148
|
+
});
|
149
|
+
});
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
14
|
+
|
15
|
+
.inkwell_timelines * {
|
16
|
+
margin: 0;
|
17
|
+
padding: 0;
|
18
|
+
}
|
19
|
+
|
20
|
+
.inkwell_timelines {
|
21
|
+
font: 14px normal Arial, Helvetica, sans-serif;
|
22
|
+
}
|
23
|
+
|
24
|
+
.inkwell_timelines .clear {
|
25
|
+
clear: both;
|
26
|
+
}
|
27
|
+
|
28
|
+
.inkwell_timelines img {
|
29
|
+
border: none;
|
30
|
+
}
|
@@ -0,0 +1,112 @@
|
|
1
|
+
.inkwell_timelines .inkwell_multi_selector {
|
2
|
+
padding: 15px 10px;
|
3
|
+
border-bottom: 1px solid #eee;
|
4
|
+
width: 620px;
|
5
|
+
}
|
6
|
+
|
7
|
+
.inkwell_timelines .inkwell_multi_selector .action {
|
8
|
+
display: inline-block;
|
9
|
+
float: left;
|
10
|
+
background-color: #eee;
|
11
|
+
color: #0084b4;
|
12
|
+
cursor: pointer;
|
13
|
+
padding: 3px 8px 4px 8px;
|
14
|
+
font-weight: bold;
|
15
|
+
-webkit-border-radius: 2px;
|
16
|
+
-khtml-border-radius: 2px;
|
17
|
+
-moz-border-radius: 2px;
|
18
|
+
border-radius: 2px;
|
19
|
+
position: relative;
|
20
|
+
}
|
21
|
+
|
22
|
+
.inkwell_timelines .inkwell_multi_selector .action .action_icon {
|
23
|
+
height: 16px;
|
24
|
+
width: 16px;
|
25
|
+
display: inline-block;
|
26
|
+
background: url('<%= asset_path 'inkwell_timelines/up-down.png' %>') no-repeat -16px -5px;
|
27
|
+
float: left;
|
28
|
+
}
|
29
|
+
|
30
|
+
.inkwell_timelines .inkwell_multi_selector .action:hover .action_icon {
|
31
|
+
background: url('<%= asset_path 'inkwell_timelines/up-down.png' %>') no-repeat -52px -5px;
|
32
|
+
}
|
33
|
+
|
34
|
+
.inkwell_timelines .inkwell_multi_selector .action.on .action_icon {
|
35
|
+
background: url('<%= asset_path 'inkwell_timelines/up-down.png' %>') no-repeat -52px -5px;
|
36
|
+
}
|
37
|
+
|
38
|
+
.inkwell_timelines .inkwell_multi_selector .action .action_name {
|
39
|
+
float: left;
|
40
|
+
}
|
41
|
+
|
42
|
+
.inkwell_timelines .inkwell_multi_selector .action:hover, .inkwell_timelines .inkwell_multi_selector .action.on {
|
43
|
+
background-color: #0084b4;
|
44
|
+
color: #eee;
|
45
|
+
}
|
46
|
+
|
47
|
+
.inkwell_timelines .inkwell_multi_selector .name {
|
48
|
+
display: inline-block;
|
49
|
+
float: left;
|
50
|
+
padding: 3px 7px 4px 0;
|
51
|
+
font-weight: bold;
|
52
|
+
}
|
53
|
+
|
54
|
+
.inkwell_timelines .inkwell_multi_selector .current_state {
|
55
|
+
padding: 3px 0 0 170px;
|
56
|
+
}
|
57
|
+
|
58
|
+
.inkwell_timelines .inkwell_multi_selector .current_state span {
|
59
|
+
margin:3px 7px 1px 0;
|
60
|
+
color: #0084b4;
|
61
|
+
cursor: pointer;
|
62
|
+
}
|
63
|
+
|
64
|
+
.inkwell_timelines .inkwell_multi_selector .current_state span:hover {
|
65
|
+
text-decoration: underline;
|
66
|
+
}
|
67
|
+
|
68
|
+
.inkwell_timelines .inkwell_multi_selector .dropdown {
|
69
|
+
width:300px;
|
70
|
+
max-height: 200px;
|
71
|
+
position: absolute;
|
72
|
+
top:25px;
|
73
|
+
left:0;
|
74
|
+
cursor: default;
|
75
|
+
color: black;
|
76
|
+
background-color: white;
|
77
|
+
padding: 15px;
|
78
|
+
border: 1px solid #eee;
|
79
|
+
font-weight: normal;
|
80
|
+
overflow: auto;
|
81
|
+
|
82
|
+
}
|
83
|
+
|
84
|
+
.inkwell_timelines .inkwell_multi_selector .checkbox_with_label {
|
85
|
+
display: inline-block;
|
86
|
+
padding-left: 20px;
|
87
|
+
background: url('<%= asset_path 'inkwell_timelines/checkbox-unchecked.png' %>') no-repeat 0 1px;
|
88
|
+
margin: 0 0 5px 5px;
|
89
|
+
}
|
90
|
+
|
91
|
+
.inkwell_timelines .inkwell_multi_selector .checkbox_with_label.checked {
|
92
|
+
background: url('<%= asset_path 'inkwell_timelines/checkbox-checked.png' %>') no-repeat 0 1px;
|
93
|
+
}
|
94
|
+
|
95
|
+
.inkwell_timelines .inkwell_multi_selector .nesting {
|
96
|
+
display: inline-block;
|
97
|
+
width: 14px;
|
98
|
+
height: 14px;
|
99
|
+
float: left;
|
100
|
+
}
|
101
|
+
|
102
|
+
.inkwell_timelines .inkwell_multi_selector .nesting.expanded {
|
103
|
+
background: url('<%= asset_path 'inkwell_timelines/minus.png' %>') no-repeat 0 2px;
|
104
|
+
}
|
105
|
+
|
106
|
+
.inkwell_timelines .inkwell_multi_selector .nesting.collapsed {
|
107
|
+
background: url('<%= asset_path 'inkwell_timelines/plus.png' %>') no-repeat 0 1px;
|
108
|
+
}
|
109
|
+
|
110
|
+
.inkwell_timelines .inkwell_multi_selector .nested {
|
111
|
+
margin-left: 19px;
|
112
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
.inkwell_timelines .tab-menu {
|
2
|
+
padding: 8px 10px 15px 10px;
|
3
|
+
font-size: 14px;
|
4
|
+
font-weight: bolder;
|
5
|
+
border-bottom: 1px solid #eee;
|
6
|
+
width: 620px;
|
7
|
+
}
|
8
|
+
|
9
|
+
.inkwell_timelines .tab-menu span {
|
10
|
+
color: #0084b4;
|
11
|
+
text-decoration: none;
|
12
|
+
cursor: pointer;
|
13
|
+
}
|
14
|
+
|
15
|
+
.inkwell_timelines .tab-menu span.active {
|
16
|
+
color: inherit;
|
17
|
+
}
|
18
|
+
|
19
|
+
.inkwell_timelines .tab-menu span:hover {
|
20
|
+
text-decoration: underline;
|
21
|
+
}
|
22
|
+
|
23
|
+
.inkwell_timelines .tab-menu > * {
|
24
|
+
margin: 5px 7px 0 0;
|
25
|
+
display: inline-block;
|
26
|
+
}
|
@@ -0,0 +1,106 @@
|
|
1
|
+
.inkwell_timelines .wall_item {
|
2
|
+
width: 620px;
|
3
|
+
padding: 15px 10px;
|
4
|
+
border-bottom: 1px solid #eee;
|
5
|
+
}
|
6
|
+
|
7
|
+
.inkwell_timelines .wall_item .avatar_link {
|
8
|
+
position: absolute;
|
9
|
+
}
|
10
|
+
|
11
|
+
.inkwell_timelines .wall_item .avatar {
|
12
|
+
width: 50px;
|
13
|
+
height: 50px;
|
14
|
+
}
|
15
|
+
|
16
|
+
.inkwell_timelines .wall_item .item_container {
|
17
|
+
margin-left: 60px;
|
18
|
+
}
|
19
|
+
|
20
|
+
.inkwell_timelines .wall_item .item_img {
|
21
|
+
width: 150px;
|
22
|
+
}
|
23
|
+
|
24
|
+
.inkwell_timelines .wall_item .item_img_link {
|
25
|
+
float: left;
|
26
|
+
padding: 0 10px 0 0;
|
27
|
+
}
|
28
|
+
|
29
|
+
.inkwell_timelines .wall_item .item_description {
|
30
|
+
margin-bottom: 10px;
|
31
|
+
}
|
32
|
+
|
33
|
+
.inkwell_timelines .item_description .name {
|
34
|
+
font-size: 14px;
|
35
|
+
padding-right: 7px;
|
36
|
+
color: #0084b4;
|
37
|
+
font-weight: bolder;
|
38
|
+
}
|
39
|
+
|
40
|
+
.inkwell_timelines .item_description .title {
|
41
|
+
font-weight: bolder;
|
42
|
+
font-size: 13px;
|
43
|
+
}
|
44
|
+
|
45
|
+
.inkwell_timelines .wall_item .item_menu {
|
46
|
+
padding-top: 10px;
|
47
|
+
}
|
48
|
+
|
49
|
+
|
50
|
+
/* Wall item menu */
|
51
|
+
|
52
|
+
.inkwell_timelines .favorite_action:hover {
|
53
|
+
background: url('<%= asset_path 'inkwell_timelines/wi-favorite-hover.png' %>') 0 2px no-repeat;
|
54
|
+
}
|
55
|
+
|
56
|
+
.inkwell_timelines .favorite_action {
|
57
|
+
background: url('<%= asset_path 'inkwell_timelines/wi-favorite.png' %>') 0 2px no-repeat;
|
58
|
+
}
|
59
|
+
|
60
|
+
.inkwell_timelines .favorite_action.active {
|
61
|
+
background: url('<%= asset_path 'inkwell_timelines/wi-favorite-active.png' %>') 0 2px no-repeat;
|
62
|
+
}
|
63
|
+
|
64
|
+
.inkwell_timelines .reblog_action:hover {
|
65
|
+
background: url('<%= asset_path 'inkwell_timelines/wi-reblog-hover.png' %>') 0 3px no-repeat;
|
66
|
+
}
|
67
|
+
|
68
|
+
.inkwell_timelines .reblog_action {
|
69
|
+
background: url('<%= asset_path 'inkwell_timelines/wi-reblog.png' %>') 0 3px no-repeat;
|
70
|
+
}
|
71
|
+
|
72
|
+
.inkwell_timelines .reblog_action.active {
|
73
|
+
background: url('<%= asset_path 'inkwell_timelines/wi-reblog-active.png' %>') 0 3px no-repeat;
|
74
|
+
}
|
75
|
+
|
76
|
+
.inkwell_timelines .comment_action:hover {
|
77
|
+
background: url('<%= asset_path 'inkwell_timelines/wi-comment-hover.png' %>') 0 4px no-repeat;
|
78
|
+
}
|
79
|
+
|
80
|
+
.inkwell_timelines .comment_action {
|
81
|
+
background: url('<%= asset_path 'inkwell_timelines/wi-comment.png' %>') 0 4px no-repeat;
|
82
|
+
}
|
83
|
+
|
84
|
+
.inkwell_timelines .wall_item .action {
|
85
|
+
display: inline-block;
|
86
|
+
padding-left: 23px;
|
87
|
+
font-size: 11px;
|
88
|
+
height: 20px;
|
89
|
+
line-height: 23px;
|
90
|
+
color: #555;
|
91
|
+
cursor: pointer;
|
92
|
+
margin-right: 10px;
|
93
|
+
float: left;
|
94
|
+
}
|
95
|
+
|
96
|
+
|
97
|
+
/* Date */
|
98
|
+
|
99
|
+
.inkwell_timelines .date {
|
100
|
+
display: inline;
|
101
|
+
font-size: 11px;
|
102
|
+
height: 18px;
|
103
|
+
line-height: 23px;
|
104
|
+
color: #555;
|
105
|
+
float: right;
|
106
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<div class="wall_item" id="<%= timeline %>_<%= record.item_id %>">
|
2
|
+
<a href="<%= user_path record.user.id %>" class="avatar_link"><img class="avatar" src="<%= record.user.avatar %>" alt="<%= record.user.nick %>"></a>
|
3
|
+
|
4
|
+
<div class="item_container">
|
5
|
+
<div class="item_description">
|
6
|
+
<span class="name"> <%= record.user.name %>:</span>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<p><%= truncate record.body, :length => 500 %></p>
|
10
|
+
|
11
|
+
<div class="clear item_menu">
|
12
|
+
<span class="favorite_action action<% if record.is_favorited %> active<% end%>"><%= record.favorite_count %></span>
|
13
|
+
<span class="reblog_action action<% if record.is_reblogged %> active<% end%>"><%= record.reblog_count %></span>
|
14
|
+
<span class="comment_action action"><%= record.comment_count %></span>
|
15
|
+
<span class="date" style="display: none;"><%= record.created_at.utc.to_i * 1000 %></span>
|
16
|
+
|
17
|
+
<div class="clear"></div>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
</div>
|
21
|
+
</div>
|