pageflow 12.0.0.rc2 → 12.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of pageflow might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -0
- data/app/assets/javascripts/pageflow/dist/react.js +66 -56
- data/app/assets/javascripts/pageflow/ui/views/inputs/select_input_view.js +1 -2
- data/app/helpers/pageflow/public_i18n_helper.rb +11 -5
- data/app/views/pageflow/entries/edit.html.erb +1 -0
- data/config/initializers/paperclip.rb +11 -11
- data/lib/pageflow/version.rb +1 -1
- metadata +4 -7
- data/app/assets/javascripts/pageflow/widgets/auto_hide_player_controls.js +0 -59
- data/app/assets/javascripts/pageflow/widgets/hide_content_during_playback.js +0 -68
- data/app/assets/javascripts/pageflow/widgets/mark_with_played_states.js +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdda86a7651604acbc2fcd947408cfa39fec92b0
|
4
|
+
data.tar.gz: 4871846efc3baf5a247310ef19059d6584c3e75f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6f9f206ce5ef78cc200fd3b94ef57edbb9493de28cbffcf863ecbdcbda2e901de679aa838777d5cc2edbd05b2e4133f3436b2b2fb79bd5367984a26f995ec0e
|
7
|
+
data.tar.gz: 53945fb69b645f38ce6a82f8e9b9ec3dc02e1669704e560dd5b60bbe38cc42d26e0a1785786ab29e82accb1a7863d4968466dd89507c57b9bf8643c493ad54f6
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,41 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
### Version 12.0.0.rc3
|
4
|
+
|
5
|
+
2017-05-12
|
6
|
+
|
7
|
+
[Compare changes](https://github.com/codevise/pageflow/compare/v12.0.0.rc2...v12.0.0.rc3)
|
8
|
+
|
9
|
+
##### Manual Update Step
|
10
|
+
|
11
|
+
- Switch from `Expires` to `Cache-Control` header for media uploads.
|
12
|
+
([#753](https://github.com/codevise/pageflow/pull/753))
|
13
|
+
|
14
|
+
It’s recommended you update the files currently stored on S3:
|
15
|
+
|
16
|
+
$ s3cmd --recursive modify --add-header="Cache-Control: public, max-age=31536000" s3://yourbucket/
|
17
|
+
$ s3cmd --recursive modify --remove-header=Expires s3://yourbucket/
|
18
|
+
|
19
|
+
Tread carefully when you do this! As noted in
|
20
|
+
[this StackExchange answer](http://stackoverflow.com/questions/22501465/how-to-add-cache-control-in-aws-s3),
|
21
|
+
we have experienced that some public read permissions were lost
|
22
|
+
after running this script. Test first using just a single object. In
|
23
|
+
the AWS Management Console, you might want to grant public read
|
24
|
+
access on the entire bucket again to be safe.
|
25
|
+
|
26
|
+
##### Minor Changes
|
27
|
+
|
28
|
+
- Ensure public translations fall back to default locale
|
29
|
+
([#757](https://github.com/codevise/pageflow/pull/757))
|
30
|
+
- Depend on pageflow-public-i18n 1.9
|
31
|
+
([#752](https://github.com/codevise/pageflow/pull/752))
|
32
|
+
- Remove jQuery widgets formerly used by player controls
|
33
|
+
([#756](https://github.com/codevise/pageflow/pull/756))
|
34
|
+
- Bug fix: Use entry locale in CloseButton translations
|
35
|
+
([#760](https://github.com/codevise/pageflow/pull/760))
|
36
|
+
- Bug fix: Fix ensureValueDefined option of SelectInputView
|
37
|
+
([#755](https://github.com/codevise/pageflow/pull/755))
|
38
|
+
|
3
39
|
### Version 12.0.0.rc2
|
4
40
|
|
5
41
|
2017-05-10
|
@@ -8205,7 +8205,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
8205
8205
|
|
8206
8206
|
var components = _interopRequireWildcard(_components);
|
8207
8207
|
|
8208
|
-
var _selectors = __webpack_require__(
|
8208
|
+
var _selectors = __webpack_require__(445);
|
8209
8209
|
|
8210
8210
|
var selectors = _interopRequireWildcard(_selectors);
|
8211
8211
|
|
@@ -8587,7 +8587,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
8587
8587
|
|
8588
8588
|
var _Icon2 = _interopRequireDefault(_Icon);
|
8589
8589
|
|
8590
|
-
var _editorOnly = __webpack_require__(
|
8590
|
+
var _editorOnly = __webpack_require__(444);
|
8591
8591
|
|
8592
8592
|
var _editorOnly2 = _interopRequireDefault(_editorOnly);
|
8593
8593
|
|
@@ -21155,31 +21155,68 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
21155
21155
|
|
21156
21156
|
/***/ },
|
21157
21157
|
/* 442 */
|
21158
|
-
/***/ function(module, exports) {
|
21158
|
+
/***/ function(module, exports, __webpack_require__) {
|
21159
21159
|
|
21160
|
-
|
21160
|
+
'use strict';
|
21161
21161
|
|
21162
21162
|
Object.defineProperty(exports, "__esModule", {
|
21163
21163
|
value: true
|
21164
21164
|
});
|
21165
21165
|
|
21166
|
-
|
21166
|
+
var _selectors = __webpack_require__(443);
|
21167
|
+
|
21168
|
+
var _utils = __webpack_require__(380);
|
21169
|
+
|
21170
|
+
var _reactRedux = __webpack_require__(359);
|
21171
|
+
|
21172
|
+
function CloseButton(props) {
|
21167
21173
|
return React.createElement(
|
21168
|
-
|
21169
|
-
{ className:
|
21170
|
-
tabIndex:
|
21171
|
-
title:
|
21174
|
+
'div',
|
21175
|
+
{ className: 'close_button text_hidden_only',
|
21176
|
+
tabIndex: '4',
|
21177
|
+
title: props.t('pageflow.public.close'),
|
21172
21178
|
onClick: props.onClick },
|
21173
21179
|
React.createElement(
|
21174
|
-
|
21175
|
-
{ className:
|
21176
|
-
|
21180
|
+
'div',
|
21181
|
+
{ className: 'label' },
|
21182
|
+
props.t('pageflow.public.close')
|
21177
21183
|
)
|
21178
21184
|
);
|
21179
|
-
}
|
21185
|
+
}
|
21186
|
+
|
21187
|
+
exports.default = (0, _reactRedux.connect)((0, _utils.combineSelectors)({
|
21188
|
+
t: _selectors.t
|
21189
|
+
}))(CloseButton);
|
21180
21190
|
|
21181
21191
|
/***/ },
|
21182
21192
|
/* 443 */
|
21193
|
+
/***/ function(module, exports, __webpack_require__) {
|
21194
|
+
|
21195
|
+
'use strict';
|
21196
|
+
|
21197
|
+
Object.defineProperty(exports, "__esModule", {
|
21198
|
+
value: true
|
21199
|
+
});
|
21200
|
+
exports.t = undefined;
|
21201
|
+
|
21202
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
21203
|
+
|
21204
|
+
exports.locale = locale;
|
21205
|
+
|
21206
|
+
var _utils = __webpack_require__(380);
|
21207
|
+
|
21208
|
+
var t = exports.t = (0, _utils.memoizedSelector)(locale, function (locale) {
|
21209
|
+
return function (key, options) {
|
21210
|
+
return I18n.t(key, _extends({ locale: locale }, options));
|
21211
|
+
};
|
21212
|
+
});
|
21213
|
+
|
21214
|
+
function locale(state) {
|
21215
|
+
return state.i18n.locale;
|
21216
|
+
}
|
21217
|
+
|
21218
|
+
/***/ },
|
21219
|
+
/* 444 */
|
21183
21220
|
/***/ function(module, exports) {
|
21184
21221
|
|
21185
21222
|
"use strict";
|
@@ -21199,7 +21236,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
21199
21236
|
};
|
21200
21237
|
|
21201
21238
|
/***/ },
|
21202
|
-
/*
|
21239
|
+
/* 445 */
|
21203
21240
|
/***/ function(module, exports, __webpack_require__) {
|
21204
21241
|
|
21205
21242
|
'use strict';
|
@@ -21211,9 +21248,9 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
21211
21248
|
|
21212
21249
|
var _selectors = __webpack_require__(337);
|
21213
21250
|
|
21214
|
-
var _selectors2 = __webpack_require__(
|
21251
|
+
var _selectors2 = __webpack_require__(446);
|
21215
21252
|
|
21216
|
-
var _selectors3 = __webpack_require__(
|
21253
|
+
var _selectors3 = __webpack_require__(443);
|
21217
21254
|
|
21218
21255
|
var _selectors4 = __webpack_require__(449);
|
21219
21256
|
|
@@ -21233,7 +21270,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
21233
21270
|
exports.prop = _selectors6.prop;
|
21234
21271
|
|
21235
21272
|
/***/ },
|
21236
|
-
/*
|
21273
|
+
/* 446 */
|
21237
21274
|
/***/ function(module, exports, __webpack_require__) {
|
21238
21275
|
|
21239
21276
|
'use strict';
|
@@ -21246,9 +21283,9 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
21246
21283
|
|
21247
21284
|
var _selectors = __webpack_require__(337);
|
21248
21285
|
|
21249
|
-
var _selectors2 = __webpack_require__(
|
21286
|
+
var _selectors2 = __webpack_require__(447);
|
21250
21287
|
|
21251
|
-
var _selectors3 = __webpack_require__(
|
21288
|
+
var _selectors3 = __webpack_require__(448);
|
21252
21289
|
|
21253
21290
|
function currentParentChapterAttributes() {
|
21254
21291
|
return function (state, props) {
|
@@ -21283,7 +21320,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
21283
21320
|
}
|
21284
21321
|
|
21285
21322
|
/***/ },
|
21286
|
-
/*
|
21323
|
+
/* 447 */
|
21287
21324
|
/***/ function(module, exports, __webpack_require__) {
|
21288
21325
|
|
21289
21326
|
'use strict';
|
@@ -21309,7 +21346,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
21309
21346
|
var chapterAttributes = exports.chapterAttributes = selector;
|
21310
21347
|
|
21311
21348
|
/***/ },
|
21312
|
-
/*
|
21349
|
+
/* 448 */
|
21313
21350
|
/***/ function(module, exports, __webpack_require__) {
|
21314
21351
|
|
21315
21352
|
'use strict';
|
@@ -21332,33 +21369,6 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
21332
21369
|
});
|
21333
21370
|
}
|
21334
21371
|
|
21335
|
-
/***/ },
|
21336
|
-
/* 448 */
|
21337
|
-
/***/ function(module, exports, __webpack_require__) {
|
21338
|
-
|
21339
|
-
'use strict';
|
21340
|
-
|
21341
|
-
Object.defineProperty(exports, "__esModule", {
|
21342
|
-
value: true
|
21343
|
-
});
|
21344
|
-
exports.t = undefined;
|
21345
|
-
|
21346
|
-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
21347
|
-
|
21348
|
-
exports.locale = locale;
|
21349
|
-
|
21350
|
-
var _utils = __webpack_require__(380);
|
21351
|
-
|
21352
|
-
var t = exports.t = (0, _utils.memoizedSelector)(locale, function (locale) {
|
21353
|
-
return function (key, options) {
|
21354
|
-
return I18n.t(key, _extends({ locale: locale }, options));
|
21355
|
-
};
|
21356
|
-
});
|
21357
|
-
|
21358
|
-
function locale(state) {
|
21359
|
-
return state.i18n.locale;
|
21360
|
-
}
|
21361
|
-
|
21362
21372
|
/***/ },
|
21363
21373
|
/* 449 */
|
21364
21374
|
/***/ function(module, exports) {
|
@@ -21627,7 +21637,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
21627
21637
|
|
21628
21638
|
var _selectors = __webpack_require__(454);
|
21629
21639
|
|
21630
|
-
var _selectors2 = __webpack_require__(
|
21640
|
+
var _selectors2 = __webpack_require__(443);
|
21631
21641
|
|
21632
21642
|
var _actions = __webpack_require__(455);
|
21633
21643
|
|
@@ -21816,7 +21826,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
21816
21826
|
|
21817
21827
|
var _selectors3 = __webpack_require__(449);
|
21818
21828
|
|
21819
|
-
var _selectors4 = __webpack_require__(
|
21829
|
+
var _selectors4 = __webpack_require__(443);
|
21820
21830
|
|
21821
21831
|
var _utils = __webpack_require__(380);
|
21822
21832
|
|
@@ -22142,7 +22152,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
22142
22152
|
|
22143
22153
|
var _utils = __webpack_require__(380);
|
22144
22154
|
|
22145
|
-
var _selectors = __webpack_require__(
|
22155
|
+
var _selectors = __webpack_require__(443);
|
22146
22156
|
|
22147
22157
|
var _selectors2 = __webpack_require__(457);
|
22148
22158
|
|
@@ -22223,7 +22233,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
22223
22233
|
|
22224
22234
|
var _selectors = __webpack_require__(405);
|
22225
22235
|
|
22226
|
-
var _selectors2 = __webpack_require__(
|
22236
|
+
var _selectors2 = __webpack_require__(445);
|
22227
22237
|
|
22228
22238
|
var _utils = __webpack_require__(380);
|
22229
22239
|
|
@@ -22475,7 +22485,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
22475
22485
|
|
22476
22486
|
var _selectors2 = __webpack_require__(449);
|
22477
22487
|
|
22478
|
-
var _selectors3 = __webpack_require__(
|
22488
|
+
var _selectors3 = __webpack_require__(445);
|
22479
22489
|
|
22480
22490
|
var _selectors4 = __webpack_require__(402);
|
22481
22491
|
|
@@ -23391,7 +23401,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
23391
23401
|
|
23392
23402
|
var _selectors = __webpack_require__(337);
|
23393
23403
|
|
23394
|
-
var _selectors2 = __webpack_require__(
|
23404
|
+
var _selectors2 = __webpack_require__(445);
|
23395
23405
|
|
23396
23406
|
var _utils = __webpack_require__(380);
|
23397
23407
|
|
@@ -26046,7 +26056,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
26046
26056
|
|
26047
26057
|
var _selectors2 = __webpack_require__(337);
|
26048
26058
|
|
26049
|
-
var _selectors3 = __webpack_require__(
|
26059
|
+
var _selectors3 = __webpack_require__(443);
|
26050
26060
|
|
26051
26061
|
var _selectors4 = __webpack_require__(405);
|
26052
26062
|
|
@@ -26215,7 +26225,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
26215
26225
|
|
26216
26226
|
var _selectors2 = __webpack_require__(337);
|
26217
26227
|
|
26218
|
-
var _selectors3 = __webpack_require__(
|
26228
|
+
var _selectors3 = __webpack_require__(443);
|
26219
26229
|
|
26220
26230
|
var _selectors4 = __webpack_require__(405);
|
26221
26231
|
|
@@ -138,8 +138,7 @@ pageflow.SelectInputView = Backbone.Marionette.ItemView.extend({
|
|
138
138
|
this.load();
|
139
139
|
this.listenTo(this.model, 'change:' + this.options.propertyName, this.load);
|
140
140
|
|
141
|
-
if (this.options.ensureValueDefined && !this.
|
142
|
-
this.ui.select.val(this.options.values[0]);
|
141
|
+
if (this.options.ensureValueDefined && !this.model.has(this.options.propertyName)) {
|
143
142
|
this.save();
|
144
143
|
}
|
145
144
|
},
|
@@ -3,11 +3,17 @@ module Pageflow
|
|
3
3
|
def public_i18n_javascript_tag(entry)
|
4
4
|
render('pageflow/public_i18n/javascript_tag',
|
5
5
|
entry_locale: entry.locale,
|
6
|
-
translations:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
translations: public_i18n_translations(entry))
|
7
|
+
end
|
8
|
+
|
9
|
+
def public_i18n_translations(entry)
|
10
|
+
{
|
11
|
+
pageflow: {
|
12
|
+
public: I18n.t('pageflow.public', locale: entry.locale)
|
13
|
+
.dup
|
14
|
+
.deep_merge(I18n.t('pageflow.public', locale: I18n.default_locale))
|
15
|
+
}
|
16
|
+
}
|
11
17
|
end
|
12
18
|
end
|
13
19
|
end
|
@@ -6,31 +6,31 @@ Pageflow.configure do |config|
|
|
6
6
|
|
7
7
|
if Rails.env.test?
|
8
8
|
config.paperclip_s3_default_options.merge!({
|
9
|
-
:
|
10
|
-
:
|
9
|
+
storage: :filesystem,
|
10
|
+
path: ':rails_root/tmp/attachments/test/s3/:class/:attachment/:id_partition/:style/:filename'
|
11
11
|
})
|
12
12
|
else
|
13
13
|
config.paperclip_s3_default_options.merge!({
|
14
|
-
:
|
15
|
-
:
|
16
|
-
:
|
14
|
+
storage: :s3,
|
15
|
+
s3_headers: {'Cache-Control' => "public, max-age=31536000"},
|
16
|
+
s3_options: {max_retries: 10},
|
17
17
|
|
18
|
-
:
|
19
|
-
:
|
18
|
+
url: ':s3_alias_url',
|
19
|
+
path: ':host/:class_basename/:attachment/:id_partition/:pageflow_attachments_version:style/:filename',
|
20
20
|
|
21
21
|
# Paperclip deletes and reuploads the original on
|
22
22
|
# reprocess. Sometimes S3 seems to change the order of commands
|
23
23
|
# causing the image to be deleted. This is fixed on paperclip
|
24
24
|
# master, but for us not deleting old files is good enough. They
|
25
25
|
# might be in the CDN anyway.
|
26
|
-
:
|
26
|
+
keep_old_files: true
|
27
27
|
})
|
28
28
|
end
|
29
29
|
|
30
30
|
config.paperclip_filesystem_default_options.merge!({
|
31
|
-
:
|
32
|
-
:
|
33
|
-
:
|
31
|
+
storage: :filesystem,
|
32
|
+
path: ':pageflow_filesystem_root/:class/:attachment/:id_partition/:style/:filename',
|
33
|
+
url: 'not_uploaded_yet'
|
34
34
|
})
|
35
35
|
|
36
36
|
config.thumbnail_styles = {
|
data/lib/pageflow/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pageflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.0.0.
|
4
|
+
version: 12.0.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Codevise Solutions Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -540,14 +540,14 @@ dependencies:
|
|
540
540
|
requirements:
|
541
541
|
- - "~>"
|
542
542
|
- !ruby/object:Gem::Version
|
543
|
-
version: '1.
|
543
|
+
version: '1.9'
|
544
544
|
type: :runtime
|
545
545
|
prerelease: false
|
546
546
|
version_requirements: !ruby/object:Gem::Requirement
|
547
547
|
requirements:
|
548
548
|
- - "~>"
|
549
549
|
- !ruby/object:Gem::Version
|
550
|
-
version: '1.
|
550
|
+
version: '1.9'
|
551
551
|
- !ruby/object:Gem::Dependency
|
552
552
|
name: bcrypt
|
553
553
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1321,13 +1321,10 @@ files:
|
|
1321
1321
|
- app/assets/javascripts/pageflow/visited.js
|
1322
1322
|
- app/assets/javascripts/pageflow/widget_types.js
|
1323
1323
|
- app/assets/javascripts/pageflow/widgets.js
|
1324
|
-
- app/assets/javascripts/pageflow/widgets/auto_hide_player_controls.js
|
1325
1324
|
- app/assets/javascripts/pageflow/widgets/events.js
|
1326
1325
|
- app/assets/javascripts/pageflow/widgets/fullscreen_button.js
|
1327
1326
|
- app/assets/javascripts/pageflow/widgets/header.js
|
1328
|
-
- app/assets/javascripts/pageflow/widgets/hide_content_during_playback.js
|
1329
1327
|
- app/assets/javascripts/pageflow/widgets/loading_spinner.js
|
1330
|
-
- app/assets/javascripts/pageflow/widgets/mark_with_played_states.js
|
1331
1328
|
- app/assets/javascripts/pageflow/widgets/multimedia_alert.js
|
1332
1329
|
- app/assets/javascripts/pageflow/widgets/mute_button.js
|
1333
1330
|
- app/assets/javascripts/pageflow/widgets/navigation.js
|
@@ -1,59 +0,0 @@
|
|
1
|
-
jQuery.widget('pageflow.autoHidePlayerControls', {
|
2
|
-
attach: function(player) {
|
3
|
-
var element = this.element;
|
4
|
-
var options = this.options;
|
5
|
-
var pageElement = this.options.pageElement;
|
6
|
-
var target = this.options.target;
|
7
|
-
var timeout;
|
8
|
-
|
9
|
-
pageElement.on('mousemove', autoHideControls);
|
10
|
-
$('body').on('keydown', autoHideControls);
|
11
|
-
pageElement.find('.content').on('touchstart', autoHideControls);
|
12
|
-
|
13
|
-
player.on('play', function() {
|
14
|
-
autoHideControls();
|
15
|
-
});
|
16
|
-
|
17
|
-
player.on('pause', showControls);
|
18
|
-
|
19
|
-
element.on('mouseenter', function() {
|
20
|
-
target.addClass('is_control_bar_hovered');
|
21
|
-
});
|
22
|
-
|
23
|
-
element.on('mouseleave', function() {
|
24
|
-
target.removeClass('is_control_bar_hovered');
|
25
|
-
});
|
26
|
-
|
27
|
-
function autoHideControls() {
|
28
|
-
showControls();
|
29
|
-
if (!pageflow.browser.has('phone platform')) {
|
30
|
-
clearTimeout(timeout);
|
31
|
-
timeout = setTimeout(hideControls, 2000);
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
function hideControls() {
|
36
|
-
if (!player.paused()) {
|
37
|
-
target.addClass('is_idle');
|
38
|
-
element.addClass('has_been_faded');
|
39
|
-
|
40
|
-
if (options.onHide) {
|
41
|
-
options.onHide();
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|
45
|
-
|
46
|
-
function showControls() {
|
47
|
-
target.removeClass('is_idle');
|
48
|
-
|
49
|
-
if (options.onShow) {
|
50
|
-
options.onShow();
|
51
|
-
}
|
52
|
-
}
|
53
|
-
},
|
54
|
-
|
55
|
-
reset: function(options) {
|
56
|
-
this.element
|
57
|
-
.removeClass('has_been_faded');
|
58
|
-
}
|
59
|
-
});
|
@@ -1,68 +0,0 @@
|
|
1
|
-
jQuery.widget('pageflow.hideContentDuringPlayback', {
|
2
|
-
attach: function(player) {
|
3
|
-
var scrollIndicator = this.options.scrollIndicator;
|
4
|
-
var content = this.element.find('.scroller, .controls, .shadow');
|
5
|
-
var waitingOnUnderrun = false;
|
6
|
-
var widget = this;
|
7
|
-
|
8
|
-
this.scroller = this.element.find('.scroller');
|
9
|
-
|
10
|
-
player.on('bufferunderrun', function() {
|
11
|
-
waitingOnUnderrun = true;
|
12
|
-
});
|
13
|
-
|
14
|
-
player.on('bufferunderruncontinue', function() {
|
15
|
-
waitingOnUnderrun = false;
|
16
|
-
});
|
17
|
-
|
18
|
-
player.on('pause', function() {
|
19
|
-
content.addClass('lock-showing');
|
20
|
-
|
21
|
-
if (!waitingOnUnderrun) {
|
22
|
-
content.addClass('is_paused').removeClass('is_playing');
|
23
|
-
widget._removeDelayedIsPlayingClass();
|
24
|
-
|
25
|
-
scrollIndicator.enable();
|
26
|
-
}
|
27
|
-
});
|
28
|
-
|
29
|
-
player.on('play', function() {
|
30
|
-
content.removeClass('lock-showing is_paused').addClass('is_playing');
|
31
|
-
widget._addDelayedIsPlayingClass();
|
32
|
-
|
33
|
-
if (pageflow.widgets.isPresent('classic_player_controls')) {
|
34
|
-
scrollIndicator.scheduleDisable();
|
35
|
-
}
|
36
|
-
else {
|
37
|
-
scrollIndicator.disable();
|
38
|
-
}
|
39
|
-
});
|
40
|
-
|
41
|
-
player.on('ended', function() {
|
42
|
-
content.addClass('lock-showing');
|
43
|
-
content.addClass('is_paused').removeClass('is_playing');
|
44
|
-
|
45
|
-
widget._removeDelayedIsPlayingClass();
|
46
|
-
|
47
|
-
scrollIndicator.enable();
|
48
|
-
});
|
49
|
-
|
50
|
-
content.addClass('lock-showing is_paused');
|
51
|
-
},
|
52
|
-
|
53
|
-
_addDelayedIsPlayingClass: function() {
|
54
|
-
this.scroller.addClass('is_playing_delayed');
|
55
|
-
clearTimeout(this.delayedPlayingClassTimeout);
|
56
|
-
this.delayedPlayingClassTimeout = null;
|
57
|
-
},
|
58
|
-
|
59
|
-
_removeDelayedIsPlayingClass: function() {
|
60
|
-
var scroller = this.scroller;
|
61
|
-
|
62
|
-
if (!this.delayedPlayingClassTimeout) {
|
63
|
-
this.delayedPlayingClassTimeout = setTimeout(function() {
|
64
|
-
scroller.removeClass('is_playing_delayed');
|
65
|
-
}, 700);
|
66
|
-
}
|
67
|
-
},
|
68
|
-
});
|
@@ -1,23 +0,0 @@
|
|
1
|
-
jQuery.widget('pageflow.markWithPlayedStates', {
|
2
|
-
attach: function(player) {
|
3
|
-
var element = this.element;
|
4
|
-
|
5
|
-
player.on('play', function() {
|
6
|
-
element.removeClass('unplayed');
|
7
|
-
});
|
8
|
-
|
9
|
-
player.on('pause', function() {
|
10
|
-
element.addClass('has_played');
|
11
|
-
});
|
12
|
-
},
|
13
|
-
|
14
|
-
reset: function(options) {
|
15
|
-
this.element.toggleClass('unplayed', !this._willAutoplay(options));
|
16
|
-
this.element.removeClass('has_played');
|
17
|
-
},
|
18
|
-
|
19
|
-
_willAutoplay: function(options) {
|
20
|
-
options = options || {};
|
21
|
-
return options.autoplay && !pageflow.browser.has('mobile platform');
|
22
|
-
}
|
23
|
-
});
|