Merge branch 'feature/new-mobile'
This commit is contained in:
commit
155201ed82
|
@ -173,6 +173,9 @@ require([
|
||||||
// Default title for modals
|
// Default title for modals
|
||||||
modalTitle: 'ONLYOFFICE',
|
modalTitle: 'ONLYOFFICE',
|
||||||
|
|
||||||
|
// Enable tap hold events
|
||||||
|
tapHold: true,
|
||||||
|
|
||||||
// If it is webapp, we can enable hash navigation:
|
// If it is webapp, we can enable hash navigation:
|
||||||
// pushState: false,
|
// pushState: false,
|
||||||
|
|
||||||
|
|
|
@ -184,6 +184,9 @@ require([
|
||||||
// Default title for modals
|
// Default title for modals
|
||||||
modalTitle: 'ONLYOFFICE',
|
modalTitle: 'ONLYOFFICE',
|
||||||
|
|
||||||
|
// Enable tap hold events
|
||||||
|
tapHold: true,
|
||||||
|
|
||||||
// If it is webapp, we can enable hash navigation:
|
// If it is webapp, we can enable hash navigation:
|
||||||
// pushState: false,
|
// pushState: false,
|
||||||
|
|
||||||
|
|
|
@ -156,6 +156,8 @@ define([
|
||||||
me.searchNext.single('click', _.bind(me.onSearchNext, me));
|
me.searchNext.single('click', _.bind(me.onSearchNext, me));
|
||||||
me.replaceBtn.single('click', _.bind(me.onReplace, me));
|
me.replaceBtn.single('click', _.bind(me.onReplace, me));
|
||||||
|
|
||||||
|
$$('.searchbar.document .link.replace').on('taphold', _.bind(me.onReplaceAll, me));
|
||||||
|
|
||||||
me.searchBar.search(searchString);
|
me.searchBar.search(searchString);
|
||||||
me.replaceBar.search(replaceString);
|
me.replaceBar.search(replaceString);
|
||||||
},
|
},
|
||||||
|
@ -241,6 +243,28 @@ define([
|
||||||
this.onQueryReplace(this.searchBar.query, this.replaceBar.query);
|
this.onQueryReplace(this.searchBar.query, this.replaceBar.query);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onReplaceAll: function (e) {
|
||||||
|
var me = this,
|
||||||
|
popover =[
|
||||||
|
'<div class="popover" style="width: auto;">',
|
||||||
|
'<div class="popover-inner">',
|
||||||
|
'<div class="list-block">',
|
||||||
|
'<ul>',
|
||||||
|
'<li><a href="#" id="replace-all" class="item-link list-button">{0}</li>'.format(me.textReplaceAll),
|
||||||
|
'</ul>',
|
||||||
|
'</div>',
|
||||||
|
'</div>',
|
||||||
|
'</div>'
|
||||||
|
].join('');
|
||||||
|
|
||||||
|
popover = uiApp.popover(popover, $$(e.currentTarget));
|
||||||
|
|
||||||
|
$('#replace-all').single('click', _.bind(function () {
|
||||||
|
me.onQueryReplaceAll(this.searchBar.query, this.replaceBar.query);
|
||||||
|
uiApp.closeModal(popover);
|
||||||
|
}, me))
|
||||||
|
},
|
||||||
|
|
||||||
onQuerySearch: function(query, direction) {
|
onQuerySearch: function(query, direction) {
|
||||||
var matchcase = Common.SharedSettings.get('search-case-sensitive') || false,
|
var matchcase = Common.SharedSettings.get('search-case-sensitive') || false,
|
||||||
matchword = Common.SharedSettings.get('search-highlight') || false;
|
matchword = Common.SharedSettings.get('search-highlight') || false;
|
||||||
|
@ -305,7 +329,8 @@ define([
|
||||||
|
|
||||||
// API handlers
|
// API handlers
|
||||||
|
|
||||||
textNoTextFound : 'Text not found'
|
textNoTextFound: 'Text not found',
|
||||||
|
textReplaceAll: 'Replace All'
|
||||||
}
|
}
|
||||||
})(), DE.Controllers.Search || {}))
|
})(), DE.Controllers.Search || {}))
|
||||||
});
|
});
|
|
@ -96,6 +96,7 @@
|
||||||
"DE.Controllers.DocumentHolder.menuOpenLink": "Open Link",
|
"DE.Controllers.DocumentHolder.menuOpenLink": "Open Link",
|
||||||
|
|
||||||
"DE.Controllers.Search.textNoTextFound": "Text not Found",
|
"DE.Controllers.Search.textNoTextFound": "Text not Found",
|
||||||
|
"DE.Controllers.Search.textReplaceAll": "Replace All",
|
||||||
"DE.Views.Search.textFind": "Find",
|
"DE.Views.Search.textFind": "Find",
|
||||||
"DE.Views.Search.textFindAndReplace": "Find and Replace",
|
"DE.Views.Search.textFindAndReplace": "Find and Replace",
|
||||||
"DE.Views.Search.textDone": "Done",
|
"DE.Views.Search.textDone": "Done",
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue