Only show nick completion button on mobile UI
This commit is contained in:
parent
520f2ac349
commit
c6a8b69fe0
2 changed files with 8 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
||||||
<textarea id="{{inputId}}" class="form-control favorite-font" ng-trim="false" rows="1" ng-change="inputChanged()" autocomplete="on" ng-model="command" ng-focus="hideSidebar()">
|
<textarea id="{{inputId}}" class="form-control favorite-font" ng-trim="false" rows="1" ng-change="inputChanged()" autocomplete="on" ng-model="command" ng-focus="hideSidebar()">
|
||||||
</textarea>
|
</textarea>
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-complete-nick unselectable" title="Complete nick" ng-click="handleCompleteNickButton($event)"><i class="glyphicon glyphicon-chevron-right"></i></button>
|
<button class="btn btn-complete-nick unselectable" title="Complete nick" ng-hide="hideCompleteNickButton()" ng-click="handleCompleteNickButton($event)"><i class="glyphicon glyphicon-chevron-right"></i></button>
|
||||||
<label class="btn btn-send-image unselectable" for="imgur-upload" title="Send image">
|
<label class="btn btn-send-image unselectable" for="imgur-upload" title="Send image">
|
||||||
<i class="glyphicon glyphicon-picture"></i>
|
<i class="glyphicon glyphicon-picture"></i>
|
||||||
<input type="file" accept="image/*" multiple title="Send image" id="imgur-upload" class="imgur-upload" file-change="uploadImage($event, files)">
|
<input type="file" accept="image/*" multiple title="Send image" id="imgur-upload" class="imgur-upload" file-change="uploadImage($event, files)">
|
||||||
|
|
|
@ -14,7 +14,7 @@ weechat.directive('inputBar', function() {
|
||||||
command: '=command'
|
command: '=command'
|
||||||
},
|
},
|
||||||
|
|
||||||
controller: ['$rootScope', '$scope', '$element', '$log', 'connection', 'imgur', 'models', 'IrcUtils', 'settings', function($rootScope,
|
controller: ['$rootScope', '$scope', '$element', '$log', 'connection', 'imgur', 'models', 'IrcUtils', 'settings', 'utils', function($rootScope,
|
||||||
$scope,
|
$scope,
|
||||||
$element, //XXX do we need this? don't seem to be using it
|
$element, //XXX do we need this? don't seem to be using it
|
||||||
$log,
|
$log,
|
||||||
|
@ -22,7 +22,8 @@ weechat.directive('inputBar', function() {
|
||||||
imgur,
|
imgur,
|
||||||
models,
|
models,
|
||||||
IrcUtils,
|
IrcUtils,
|
||||||
settings) {
|
settings,
|
||||||
|
utils) {
|
||||||
|
|
||||||
// E.g. Turn :smile: into the unicode equivalent
|
// E.g. Turn :smile: into the unicode equivalent
|
||||||
$scope.inputChanged = function() {
|
$scope.inputChanged = function() {
|
||||||
|
@ -503,6 +504,10 @@ weechat.directive('inputBar', function() {
|
||||||
$scope.completeNick();
|
$scope.completeNick();
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.hideCompleteNickButton = function() {
|
||||||
|
return !utils.isMobileUi();
|
||||||
|
};
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue