Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="downloads">
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/downloads" javascript_name="ips.downloads.browse.js" javascript_type="controller" javascript_version="103038" javascript_position="1000200">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/downloads" javascript_name="ips.downloads.browse.js" javascript_type="controller" javascript_version="105100" javascript_position="1000200">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -59,7 +59,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="admin" javascript_path="controllers/settings" javascript_name="ips.settings.settings.js" javascript_type="controller" javascript_version="103038" javascript_position="1000050">/**
|
||||
<file javascript_app="downloads" javascript_location="admin" javascript_path="controllers/settings" javascript_name="ips.settings.settings.js" javascript_type="controller" javascript_version="105100" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.linkedScreenshots.js" javascript_type="controller" javascript_version="103038" javascript_position="1000100">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.linkedScreenshots.js" javascript_type="controller" javascript_version="105100" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -184,7 +184,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.main.js" javascript_type="controller" javascript_version="103038" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.main.js" javascript_type="controller" javascript_version="105100" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -203,6 +203,9 @@
|
||||
_ui: {},
|
||||
_hiddenUploader: false,
|
||||
_overriddenUploader: false,
|
||||
_allowMultipleFiles: false,
|
||||
_newVersion: false,
|
||||
_uploadedCount: 0,
|
||||
|
||||
initialize: function () {
|
||||
this.on( 'uploadedCountChanged', this.uploadCounter );
|
||||
@@ -233,6 +236,14 @@
|
||||
this._bulkUpload = true;
|
||||
}
|
||||
|
||||
if( this.scope.attr('data-multipleFiles' ) ){
|
||||
this._allowMultipleFiles = true;
|
||||
}
|
||||
|
||||
if( this.scope.attr('data-newVersion' ) ){
|
||||
this._newVersion = true;
|
||||
}
|
||||
|
||||
this._ui = {
|
||||
progressBar: this.scope.find('#elDownloadsSubmit_progress'),
|
||||
screenshots: this.scope.find('#elDownloadsSubmit_screenshots'),
|
||||
@@ -240,8 +251,8 @@
|
||||
};
|
||||
|
||||
|
||||
var hideProgressBar = function () {
|
||||
if( !_.isUndefined( self._ui.progressBar.attr('data-ipsSticky') ) ){
|
||||
var hideProgressBar = function ( force=false ) {
|
||||
if( !_.isUndefined( self._ui.progressBar.attr('data-ipsSticky') ) && !force ){
|
||||
self.on( 'stickyInit', function () {
|
||||
self._ui.progressBar.hide();
|
||||
});
|
||||
@@ -251,11 +262,15 @@
|
||||
};
|
||||
|
||||
// Are there any existing files?
|
||||
if( !this._hasExistingFiles() ){
|
||||
hideProgressBar();
|
||||
if( !this._hasExistingFiles() && !this._newVersion ){
|
||||
hideProgressBar( true );
|
||||
this._ui.screenshots.hide();
|
||||
this._ui.fileInfo.hide();
|
||||
this.scope.find('[data-role="submitForm"]').prop( 'disabled', true );
|
||||
this._toggleFileImportOptions();
|
||||
} else if( this._newVersion ) {
|
||||
hideProgressBar( true );
|
||||
this._toggleFileImportOptions( true );
|
||||
} else {
|
||||
if( !this.scope.find('input[name^="files_existing"]').length ){
|
||||
hideProgressBar();
|
||||
@@ -372,9 +387,11 @@
|
||||
.css( {
|
||||
width: '0%'
|
||||
});
|
||||
this._ui.progressBar.hide();
|
||||
|
||||
this.scope.find('#elDownloadsSubmit_uploader .ipsAttachment_dropZone').show();
|
||||
this.scope.find('#elDownloadsSubmit_uploader [data-action="uploadMore"]').hide();
|
||||
this.scope.find('#elDownloadsSingleMessage').hide();
|
||||
this._hiddenUploader = false;
|
||||
this._overriddenUploader = true;
|
||||
}
|
||||
@@ -391,6 +408,9 @@
|
||||
if( data.uploader != 'files' ){
|
||||
return;
|
||||
}
|
||||
|
||||
this._uploadedCount = data.count;
|
||||
this._toggleFileImportOptions();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -435,7 +455,7 @@
|
||||
var invalid = 0;
|
||||
|
||||
this.scope.find('input[name^="' + inputName + '"]').each( function () {
|
||||
if( $.trim( $( this ).val() ) ){
|
||||
if( $( this ).val().trim() ){
|
||||
length++;
|
||||
}
|
||||
|
||||
@@ -448,6 +468,9 @@
|
||||
this.scope.find( '#' + elemID ).trigger('closeMenu');
|
||||
}
|
||||
|
||||
// Update UI if we have a file limit
|
||||
this._toggleFileImportOptions();
|
||||
|
||||
this.scope.find('#' + elemID + ' [data-role="fileCount"]').text( length );
|
||||
|
||||
if( length ){
|
||||
@@ -465,7 +488,7 @@
|
||||
* @returns {boolean} Returns true if there are existing files
|
||||
*/
|
||||
_hasExistingFiles: function () {
|
||||
if( this.scope.find('input[name^="files_existing"]').length ){
|
||||
if( this._uploadedCount || this.scope.find('input[name^="files_existing"]').length ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -474,7 +497,7 @@
|
||||
|
||||
if( this.scope.find('input[name^="url_files"]').length ){
|
||||
hasURL = _.filter( this.scope.find('input[name^="url_files"]'), function (item) {
|
||||
if( $.trim( $( item ).val() ) != '' ){
|
||||
if( $( item ).val().trim() != '' ){
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -484,7 +507,7 @@
|
||||
|
||||
if( this.scope.find('input[name^="import_files"]').length ){
|
||||
hasImport = _.filter( this.scope.find('input[name^="import_files"]'), function (item) {
|
||||
if( $.trim( $( item ).val() ) != '' ){
|
||||
if( $( item ).val().trim() != '' ){
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -513,7 +536,7 @@
|
||||
|
||||
if( this.scope.find('input[name^="url_screenshots"]').length ){
|
||||
hasURL = _.filter( this.scope.find('input[name^="url_screenshots"]'), function (item) {
|
||||
if( $.trim( $( item ).val() ) != '' ){
|
||||
if( $( item ).val().trim() != '' ){
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -582,12 +605,41 @@
|
||||
this._ui.progressBar.show().find('.ipsProgressBar').addClass('ipsProgressBar_animated');
|
||||
this.scope.find('#elDownloadsSubmit_uploader .ipsAttachment_dropZone').hide();
|
||||
this.scope.find('#elDownloadsSubmit_uploader [data-action="uploadMore"]').show();
|
||||
this.scope.find('#elDownloadsSubmit_uploader #elDownloadsSingleMessage').show();
|
||||
this._hiddenUploader = true;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Toggle file upload/import options when a file has been uploaded and single file uploads are enforced
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
_toggleFileImportOptions: function ( force=false) {
|
||||
if( this._allowMultipleFiles === true ) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.scope.find('a[data-action="stackAdd"]').hide();
|
||||
if( this._hasExistingFiles() || force ) {
|
||||
this.scope.find('[data-role="stackItem"] input[name^="url_files"], [data-role="stackItem"] input[name^="import_files"]').each( function() {
|
||||
if( $(this).val() == "" ) {
|
||||
$(this).prop( 'disabled', true );
|
||||
}
|
||||
});
|
||||
this.scope.find('#elDownloadsSubmit_uploader .ipsAttachment_dropZone').hide();
|
||||
this.scope.find('#elDownloadsSubmit_uploader #elDownloadsSingleMessage').show();
|
||||
}
|
||||
else {
|
||||
this.scope.find('#elDownloadsSubmit_uploader .ipsAttachment_dropZone').show();
|
||||
this.scope.find('[data-role="stackItem"] input[name^="url_files"], [data-role="stackItem"] input[name^="import_files"]').each( function() {
|
||||
$(this).prop( 'disabled', false );
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.changeLog.js" javascript_type="controller" javascript_version="103038" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.changeLog.js" javascript_type="controller" javascript_version="105100" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -690,6 +742,7 @@
|
||||
.addClass('ipsLoading')
|
||||
.html('');
|
||||
|
||||
|
||||
// Load the new data
|
||||
ips.getAjax()( url )
|
||||
.done( function (response) {
|
||||
@@ -700,6 +753,7 @@
|
||||
.css({
|
||||
height: 'auto'
|
||||
});
|
||||
ips.utils.lazyLoad.loadContent( self.scope.find('[data-role="changeLogData"]') );
|
||||
})
|
||||
.fail( function (jqXHR, textStatus, errorThrown) {
|
||||
window.location = url;
|
||||
@@ -708,7 +762,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.download.js" javascript_type="controller" javascript_version="103038" javascript_position="1000150">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.download.js" javascript_type="controller" javascript_version="105100" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -833,7 +887,70 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.submit.js" javascript_type="template" javascript_version="103038" javascript_position="1000050"><![CDATA[/* VIEW TEMPLATES */
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.subscribe.js" javascript_type="controller" javascript_version="105100" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
* ips.view.subscribe.js - Controller to handle subscribing to new version updates
|
||||
*
|
||||
* Author: Andrew Millne
|
||||
*/
|
||||
;( function($, _, undefined){
|
||||
"use strict";
|
||||
|
||||
ips.controller.register('downloads.front.view.subscribe', {
|
||||
|
||||
ajaxObj: null,
|
||||
|
||||
/**
|
||||
* Initialize controller events
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
initialize: function () {
|
||||
this.on( 'click', '[data-action="subscribe"]', this.toggle );
|
||||
},
|
||||
|
||||
/**
|
||||
* Subscribe
|
||||
*
|
||||
* @param {event} e Event object
|
||||
* @returns {void}
|
||||
*/
|
||||
toggle: function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var self = this;
|
||||
var clicked = $( e.currentTarget );
|
||||
|
||||
|
||||
clicked.addClass('ipsFaded ipsFaded_more');
|
||||
|
||||
ips.getAjax()( clicked.attr('href') )
|
||||
.done( function (response) {
|
||||
if( !response.error ) {
|
||||
if( response == 'unsubscribed' )
|
||||
{
|
||||
clicked.removeClass( 'ipsButton_primary' );
|
||||
clicked.addClass( 'ipsButton_link' );
|
||||
clicked.text( ips.getString('file_subscribe') );
|
||||
}
|
||||
else
|
||||
{
|
||||
clicked.addClass( 'ipsButton_primary' );
|
||||
clicked.removeClass( 'ipsButton_link' );
|
||||
clicked.text( ips.getString('file_unsubscribe') );
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
.always( function () {
|
||||
clicked.removeClass('ipsFaded ipsFaded_more');
|
||||
});
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.submit.js" javascript_type="template" javascript_version="105100" javascript_position="1000050"><![CDATA[/* VIEW TEMPLATES */
|
||||
ips.templates.set('downloads.submit.screenshot', " \
|
||||
<div class='ipsGrid_span3 ipsAttach ipsImageAttach ipsPad_half ipsAreaBackground_light' id='{{id}}' data-role='file' data-fileid='{{id}}' data-fullsizeurl='{{imagesrc}}' data-thumbnailurl='{{thumbnail}}' data-fileType='image'>\
|
||||
<ul class='ipsList_inline ipsImageAttach_controls'>\
|
||||
@@ -844,7 +961,7 @@ ips.templates.set('downloads.submit.screenshot', " \
|
||||
</li>\
|
||||
</ul>\
|
||||
<label for='{{field_name}}_primary_screenshot_{{id}}' class='ipsCursor_pointer'>\
|
||||
<div class='ipsImageAttach_thumb ipsType_center' data-role='preview' data-grid-ratio='65' data-action='insertFile' {{#thumb}}style='background-image: url( {{thumbnail}} )'{{/thumb}}>\
|
||||
<div class='ipsImageAttach_thumb ipsType_center' data-role='preview' data-grid-ratio='65' data-action='insertFile' {{#thumb}}style='background-image: url( \"{{thumbnail_for_css}}\" )'{{/thumb}}>\
|
||||
{{#status}}\
|
||||
<span class='ipsImageAttach_status ipsType_light' data-role='status'>{{{status}}}</span>\
|
||||
<span class='ipsAttachment_progress'><span data-role='progressbar'></span></span>\
|
||||
@@ -884,9 +1001,11 @@ controllers</order>
|
||||
jquery
|
||||
mustache
|
||||
jstz
|
||||
IntersectionObserver
|
||||
Debug.js
|
||||
app.js</order>
|
||||
<order app="global" path="/dev/js//library//jquery">jquery.js
|
||||
jquery-migrate.js
|
||||
jquery.history.js
|
||||
jquery.transform.js</order>
|
||||
<order app="global" path="/dev/js//library//linkify">linkify.min.js
|
||||
|
||||
Reference in new issue
Block a user