Merge pull request #304 from ipcjs/master

support multi header
This commit is contained in:
hamza zia 2017-02-12 01:17:20 -08:00 committed by GitHub
commit 68c8ad4f86
6 changed files with 30 additions and 19 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
.DS_STORE
.idea
.git
debug.log

View File

@ -38,7 +38,7 @@ angular
])
.constant('$downloadProps', [ // Similar to starred Quick Access properties but for adding new downloads.
// go to Advance Download Options when adding a new download to view the list of possible options
'http-user', 'http-passwd', 'pause', 'dir', 'max-connection-per-server'
'header', 'http-user', 'http-passwd', 'pause', 'dir', 'max-connection-per-server'
])
.constant('$globalTimeout', 1000) // interval to update the individual downloads
;

View File

@ -412,8 +412,9 @@
<li ng-repeat="prop in properties" class="form-group">
<label title="{{prop.desc}}" style="width: 100%;">{{prop.name}}</label>
<div class="form-group">
<select style="width: 100%;" ng-show="prop.options.length" class="form-control" ng-options="opt for opt in prop.options" ng-model="prop.val"></select>
<input style="width: 100%;" ng-show="!prop.options.length" type="text" class="form-control input-large" ng-model="prop.val"/>
<select style="width: 100%;" ng-show="prop.options.length && !prop.multiline" class="form-control" ng-options="opt for opt in prop.options" ng-model="prop.val"></select>
<input style="width: 100%;" ng-show="!prop.options.length && !prop.multiline" type="text" class="form-control input-large" ng-model="prop.val"/>
<textarea style="width: 100%;" ng-show="prop.multiline" ng-model="prop.val"></textarea>
</div>
</li>
<li>
@ -827,9 +828,10 @@
<label class="col-sm-3 control-label">{{name}}</label>
<div class="col-sm-9 controls">
<select class="form-control" ng-show="set.options.length" ng-options="opt for opt in set.options" ng-model="set.val">
<select class="form-control" ng-show="set.options.length && !set.multiline" ng-options="opt for opt in set.options" ng-model="set.val">
</select>
<input ng-show="!set.options.length" type="text" class="form-control input-xxlarge modal-form-input-verylarge" ng-model="set.val"/>
<input ng-show="!set.options.length && !set.multiline" type="text" class="form-control input-xxlarge modal-form-input-verylarge" ng-model="set.val"/>
<textarea ng-show="set.multiline" ng-model="set.val"></textarea>
</div>
<br />
</div>
@ -847,9 +849,10 @@
<label class="col-sm-3 control-label">{{name}}</label>
<div class="col-sm-9 controls">
<select class="form-control" ng-show="set.options.length" ng-options="opt for opt in set.options" ng-model="set.val">
<select class="form-control" ng-show="set.options.length && !set.multiline" ng-options="opt for opt in set.options" ng-model="set.val">
</select>
<input ng-show="!set.options.length" type="text" class="form-control input-xxlarge modal-form-input-verylarge" ng-model="set.val"/>
<input ng-show="!set.options.length && !set.multiline" type="text" class="form-control input-xxlarge modal-form-input-verylarge" ng-model="set.val"/>
<textarea ng-show="set.multiline" ng-model="set.val"></textarea>
</div>
<br />
</div>
@ -895,9 +898,10 @@
<label class="col-sm-3 control-label">{{name}}</label>
<div class="col-sm-9 controls">
<select class="form-control" ng-show="set.options.length" ng-options="opt for opt in set.options" ng-model="set.val">
<select class="form-control" ng-show="set.options.length && !set.multiline" ng-options="opt for opt in set.options" ng-model="set.val">
</select>
<input ng-show="!set.options.length" type="text" class="form-control input-xxlarge modal-form-input-verylarge" ng-model="set.val"/>
<input ng-show="!set.options.length && !set.multiline" type="text" class="form-control input-xxlarge modal-form-input-verylarge" ng-model="set.val"/>
<textarea ng-show="set.multiline" ng-model="set.val"></textarea>
</div>
<br />
</div>
@ -915,9 +919,10 @@
<label class="col-sm-3 control-label">{{name}}</label>
<div class="col-sm-9 controls">
<select class="form-control" ng-show="set.options.length" ng-options="opt for opt in set.options" ng-model="set.val">
<select class="form-control" ng-show="set.options.length && !set.multiline" ng-options="opt for opt in set.options" ng-model="set.val">
</select>
<input ng-show="!set.options.length" type="text" class="form-control input-xxlarge modal-form-input-verylarge" ng-model="set.val"/>
<input ng-show="!set.options.length && !set.multiline" type="text" class="form-control input-xxlarge modal-form-input-verylarge" ng-model="set.val"/>
<textarea ng-show="set.multiline" ng-model="set.val"></textarea>
</div>
<br />
</div>
@ -962,9 +967,10 @@
<label class="col-sm-3 control-label">{{name}}</label>
<div class="col-sm-9 controls">
<select class="form-control" ng-show="set.options.length" ng-options="opt for opt in set.options" ng-model="set.val">
<select class="form-control" ng-show="set.options.length && !set.multiline" ng-options="opt for opt in set.options" ng-model="set.val">
</select>
<input ng-show="!set.options.length" type="text" class="form-control input-xxlarge modal-form-input-verylarge" ng-model="set.val"/>
<input ng-show="!set.options.length && !set.multiline" type="text" class="form-control input-xxlarge modal-form-input-verylarge" ng-model="set.val"/>
<textarea ng-show="set.multiline" ng-model="set.val"></textarea>
</div>
<br />
</div>
@ -982,9 +988,10 @@
<label class="col-sm-3 control-label">{{name}}</label>
<div class="col-sm-9 controls">
<select class="form-control" ng-show="set.options.length" ng-options="opt for opt in set.options" ng-model="set.val">
<select class="form-control" ng-show="set.options.length && !set.multiline" ng-options="opt for opt in set.options" ng-model="set.val">
</select>
<input ng-show="!set.options.length" type="text" class="form-control input-xxlarge modal-form-input-verylarge" ng-model="set.val"/>
<input ng-show="!set.options.length && !set.multiline" type="text" class="form-control input-xxlarge modal-form-input-verylarge" ng-model="set.val"/>
<textarea ng-show="set.multiline" ng-model="set.val"></textarea>
</div>
<br />
</div>
@ -1044,9 +1051,10 @@
<label class="col-sm-3 control-label">{{name}}</label>
<div class="col-sm-9 controls">
<select class="form-control" ng-show="set.options.length" ng-options="opt for opt in set.options" ng-model="set.val">
<select class="form-control" ng-show="set.options.length && !set.multiline" ng-options="opt for opt in set.options" ng-model="set.val">
</select>
<input ng-show="!set.options.length" type="text" class="form-control input-xlarge" ng-model="set.val"/>
<input ng-show="!set.options.length && !set.multiline" type="text" class="form-control input-xlarge" ng-model="set.val"/>
<textarea ng-show="set.multiline" ng-model="set.val"></textarea>
<div class="checkbox" ng-show="set.starred != undefined">
<label>
<input type="checkbox" ng-model="set.starred"/>

View File

@ -37,7 +37,7 @@ angular
open: function(cb) {
var self = this;
this.uris = "";
this.downloadSettingsCollapsed = true;
this.downloadSettingsCollapsed = false;
this.advancedSettingsCollapsed = true;
this.settings = {};
this.fsettings = _.cloneDeep(fsettings);

View File

@ -70,6 +70,7 @@ angular.module('webui.ctrls.props', [
nprop = nprop || {};
nprop.name = prop.name;
nprop.options = prop.options;
nprop.multiline = prop.multiline;
if (nprop._val == nprop.val || nprop.val == prop.val) {
nprop._val = prop.val;
nprop.val = prop.val;

View File

@ -271,7 +271,8 @@ angular.module('webui.services.settings', [])
"header": {
val: '',
desc: "Append HEADER to HTTP request header."
desc: "Append HEADER to HTTP request header.",
multiline: true,
},
"http-accept-gzip": {