mirror of
https://github.com/fergalmoran/dss.web.git
synced 2026-02-14 20:16:55 +00:00
Merge branch 'hotfix/upload_layout'
This commit is contained in:
@@ -18,11 +18,8 @@ angular.module('dssWebApp')
|
||||
$rootScope.setCurrentUser(user);
|
||||
return $state.go(toState.name, toParams);
|
||||
}, function (reason) {
|
||||
debugger;
|
||||
console.error(reason);
|
||||
});
|
||||
} else {
|
||||
debugger;
|
||||
}
|
||||
});
|
||||
$rootScope.safeApply = function (fn) {
|
||||
|
||||
@@ -6,8 +6,10 @@ angular.module('dssWebApp')
|
||||
Session, MixModel, LoginService, ImageUploadService, SERVER_CONFIG, AUTH_EVENTS) {
|
||||
|
||||
$scope.mix = mix;
|
||||
$scope.waveformHeader = '(drag & drop or click & browse)';
|
||||
|
||||
$scope.waveformHeader =
|
||||
"<i class='fa fa-spinner fa-spin'></i>" +
|
||||
"Generating waveform, we'll try to let you know when it's done or send you an email.";
|
||||
$scope.waveformFooter = '';
|
||||
|
||||
$scope.sending = false;
|
||||
@@ -113,7 +115,7 @@ angular.module('dssWebApp')
|
||||
$scope.mix = result;
|
||||
$timeout(function () {
|
||||
var url = $state.href('root.user.mix', {user: $scope.mix.user.slug, mix: $scope.mix.slug});
|
||||
$scope.waveformFooter = "Your mix will be available <a href='" + '/' + url + "'>Here</a>";
|
||||
$scope.waveformFooter = "Your mix will be available <a href='" + url + "'>Here</a>";
|
||||
$scope.$apply();
|
||||
}, 6400);
|
||||
|
||||
@@ -151,10 +153,8 @@ angular.module('dssWebApp')
|
||||
$scope.$apply();
|
||||
},
|
||||
complete: function (file) {
|
||||
$scope.uploadState = uploadStates.AUDIO_SENT;
|
||||
if (file.status !== 'error') {
|
||||
$scope.waveformHeader =
|
||||
"<i class='fa fa-spinner fa-spin'></i>" +
|
||||
"Generating waveform, we'll try to let you know when it's done or send you an email."; $scope.uploadState = uploadStates.AUDIO_SENT;
|
||||
$scope.$apply();
|
||||
_checkRedirect();
|
||||
} else {
|
||||
@@ -171,4 +171,8 @@ angular.module('dssWebApp')
|
||||
$scope.genreSearchResults = results.data.results;
|
||||
});
|
||||
};
|
||||
$('#waveform-status-info').pulsate({
|
||||
color: "#FCB322",
|
||||
glow: true
|
||||
});
|
||||
});
|
||||
@@ -1,30 +1,34 @@
|
||||
<div ng-hide="$root.currentUser" class="row">
|
||||
<button type="button" ng-click="login()" class="btn btn-sm btn-danger">Login</button>
|
||||
</div>
|
||||
<div ng-show="uploadState==uploadStates.AUDIO_SENDING && !detailsEntered" class="progress progress-striped">
|
||||
<div role="progressbar" aria-valuenow="uploadProgress" aria-valuemin="0" aria-valuemax="100"
|
||||
ng-style="uploadProgressStyle" class="progress-bar progress-bar-success">
|
||||
{{uploadProgress}}%
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="$root.currentUser" class="row">
|
||||
<div ng-show="uploadState <= uploadStates.AUDIO_SENT" class="text-center row">
|
||||
|
||||
<div ng-show="uploadState==uploadStates.AUDIO_SENDING" class="progress progress-striped" id="progress-wrapper">
|
||||
<div role="progressbar" aria-valuenow="uploadProgress" aria-valuemin="0" aria-valuemax="100"
|
||||
ng-style="uploadProgressStyle" class="progress-bar progress-bar-success">
|
||||
{{uploadProgress}}%
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="uploadState <= uploadStates.AUDIO_SENT" class="text-center row" id="fileupload-wrapper">
|
||||
<div class="block full">
|
||||
<form id="dss-file-upload" ng-show="uploadState==0" class="dropzone">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div ng-show="uploadState==uploadStates.AUDIO_SENT" class="widget widget-simple col-md-8">
|
||||
<h6 class="description">
|
||||
<span ng-bind-html="waveformHeader | unsafe"></span><br/>
|
||||
<span ng-bind-html="waveformFooter | unsafe"></span>
|
||||
</h6>
|
||||
<div ng-show="uploadState==uploadStates.AUDIO_SENT" class="text-center row" id="status-wrapper">
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h2 class="description">
|
||||
<span id="waveform-status-info" ng-bind-html="waveformHeader | unsafe"></span><br/>
|
||||
<span ng-bind-html="waveformFooter | unsafe"></span>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="uploadState != uploadStates.VIRGIN && (!detailsEntered || uploadState == uploadStates.EDIT_MODE)"
|
||||
class="row">
|
||||
class="row" id="details-wrapper">
|
||||
<div class="block text-center">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-8">
|
||||
@@ -40,7 +44,8 @@
|
||||
<input type="text" id="title" name="title" required="" ng-minlength="5"
|
||||
ng-maxlength="250"
|
||||
ng-model="mix.title" class="form-control input-sm"/>
|
||||
<p for="title" ng-show="uploadForm.title.$invalid && uploadForm.title.$dirty"
|
||||
<p for="title"
|
||||
ng-show="uploadForm.title.$invalid && uploadForm.title.$dirty"
|
||||
class="help-block">Title must be between 5 and 250 characters</p>
|
||||
<p for="title"
|
||||
ng-show="(uploadForm.title.$error.required) && uploadForm.$dirty &&!(uploadForm.title.$invalid && uploadForm.title.$dirty)"
|
||||
@@ -75,7 +80,8 @@
|
||||
style="max-width: 200px; max-height: 150px; line-height: 20px;"></div>
|
||||
<div>
|
||||
<span class="btn btn-white btn-file">
|
||||
<span class="fileupload-new"><i class="fa fa-paper-clip"></i> Select image</span>
|
||||
<span class="fileupload-new"><i
|
||||
class="fa fa-paper-clip"></i> Select image</span>
|
||||
<span class="fileupload-exists"><i class="fa fa-undo"></i> Change</span>
|
||||
<input type="file" id="mix-image-fileinput" class="default"/>
|
||||
</span>
|
||||
@@ -109,9 +115,12 @@
|
||||
<header class="panel-heading">Mix options</header>
|
||||
<div class="panel-body">
|
||||
<div class="checkboxes">
|
||||
<pretty-checkbox ng-model="mix.is_private" label="'Private'"></pretty-checkbox>
|
||||
<pretty-checkbox ng-model="mix.is_downloadable" label="'Downloadable'"></pretty-checkbox>
|
||||
<pretty-checkbox ng-model="mix.is_featured" label="'Homepage'"></pretty-checkbox>
|
||||
<pretty-checkbox ng-model="mix.is_private"
|
||||
label="'Private'"></pretty-checkbox>
|
||||
<pretty-checkbox ng-model="mix.is_downloadable"
|
||||
label="'Downloadable'"></pretty-checkbox>
|
||||
<pretty-checkbox ng-model="mix.is_featured"
|
||||
label="'Homepage'"></pretty-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
4
client/assets/flatlab/pulstate.js
Normal file
4
client/assets/flatlab/pulstate.js
Normal file
@@ -0,0 +1,4 @@
|
||||
(function(c){var k={init:function(a){var b={color:c(this).css("background-color"),reach:20,speed:1E3,pause:0,glow:!0,repeat:!0,onHover:!1};c(this).css({"-moz-outline-radius":c(this).css("border-top-left-radius"),"-webkit-outline-radius":c(this).css("border-top-left-radius"),"outline-radius":c(this).css("border-top-left-radius")});a&&c.extend(b,a);b.color=c("<div style='background:"+b.color+"'></div>").css("background-color");!0!==b.repeat&&(!isNaN(b.repeat)&&0<b.repeat)&&(b.repeat-=1);return this.each(function(){b.onHover?
|
||||
c(this).bind("mouseover",function(){g(b,this,0)}).bind("mouseout",function(){c(this).pulsate("destroy")}):g(b,this,0)})},destroy:function(){return this.each(function(){clearTimeout(this.timer);c(this).css("outline",0)})}},g=function(a,b,d){var f=a.reach;d=d>f?0:d;var h=(f-d)/f,e=a.color.split(","),h="rgba("+e[0].split("(")[1]+","+e[1]+","+e[2].split(")")[0]+","+h+")",e={outline:"2px solid "+h};a.glow?(e["box-shadow"]="0px 0px "+parseInt(d/1.5)+"px "+h,userAgent=navigator.userAgent||"",/(chrome)[ \/]([\w.]+)/.test(userAgent.toLowerCase())&&
|
||||
(e["outline-offset"]=d+"px",e["outline-radius"]="100 px")):e["outline-offset"]=d+"px";c(b).css(e);b.timer&&clearTimeout(b.timer);b.timer=setTimeout(function(){if(d>=f&&!a.repeat)return c(b).pulsate("destroy"),!1;if(d>=f&&!0!==a.repeat&&!isNaN(a.repeat)&&0<a.repeat)a.repeat-=1;else if(a.pause&&d>=f)return l(a,b,d+1),!1;g(a,b,d+1)},a.speed/f)},l=function(a,b,c){innerfunc=function(){g(a,b,c)};b.timer=setTimeout(innerfunc,a.pause)};c.fn.pulsate=function(a){if(k[a])return k[a].apply(this,Array.prototype.slice.call(arguments,
|
||||
1));if("object"===typeof a||!a)return k.init.apply(this,arguments);c.error("Method "+a+" does not exist on jQuery.pulsate")}})(jQuery);
|
||||
@@ -147,6 +147,7 @@
|
||||
<script src="bower_components/angular-deferred-bootstrap/angular-deferred-bootstrap.js"></script>
|
||||
<script src="bower_components/SoundManager2/script/soundmanager2-nodebug.js"></script>
|
||||
<script src="assets/flatlab/bootstrap-fileupload.js"></script>
|
||||
<script src="assets/flatlab/pulstate.js"></script>
|
||||
<script src="assets/utils.js"></script>
|
||||
<script src="assets/slimscroll/jquery.slimscroll.js"></script>
|
||||
<script src="assets/dropzone/dropzone.js"></script>
|
||||
|
||||
@@ -8,7 +8,7 @@ module.exports = {
|
||||
|
||||
seedDB: true,
|
||||
redisHost: 'localhost',
|
||||
//apiUrl: 'http://ext-test.deepsouthsounds.com:8001',
|
||||
apiUrl: 'http://localhost:8001',
|
||||
apiUrl: 'http://ext-test.deepsouthsounds.com:8001',
|
||||
//apiUrl: 'http://localhost:8001',
|
||||
radioUrl: 'http://localhost:8000'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user