[SSE] Add autocorrect settings for hyperlinks
This commit is contained in:
		
							parent
							
								
									294f3661f1
								
							
						
					
					
						commit
						20d4568346
					
				| 
						 | 
					@ -81,6 +81,12 @@
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
<div id="id-autocorrect-dialog-settings-sse-autoformat" class="settings-panel">
 | 
					<div id="id-autocorrect-dialog-settings-sse-autoformat" class="settings-panel">
 | 
				
			||||||
    <div class="inner-content" style="width: 100%;">
 | 
					    <div class="inner-content" style="width: 100%;">
 | 
				
			||||||
 | 
					        <div class="padding-small">
 | 
				
			||||||
 | 
					            <label class="header"><%= scope.textReplaceText %></label>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					        <div class="padding-large">
 | 
				
			||||||
 | 
					            <div id="id-autocorrect-dialog-chk-hyperlink"></div>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
        <div class="padding-small">
 | 
					        <div class="padding-small">
 | 
				
			||||||
            <label class="header"><%= scope.textApplyAsWork %></label>
 | 
					            <label class="header"><%= scope.textApplyAsWork %></label>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -335,6 +335,17 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
 | 
				
			||||||
                    Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-new-rows", checked);
 | 
					                    Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-new-rows", checked);
 | 
				
			||||||
                    me.api.asc_setIncludeNewRowColTable(checked);
 | 
					                    me.api.asc_setIncludeNewRowColTable(checked);
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                this.chHyperlink = new Common.UI.CheckBox({
 | 
				
			||||||
 | 
					                    el: $('#id-autocorrect-dialog-chk-hyperlink'),
 | 
				
			||||||
 | 
					                    labelText: this.textHyperlink,
 | 
				
			||||||
 | 
					                    value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-hyperlink")
 | 
				
			||||||
 | 
					                }).on('change', function(field, newValue, oldValue, eOpts){
 | 
				
			||||||
 | 
					                    var checked = (field.getValue()==='checked');
 | 
				
			||||||
 | 
					                    Common.localStorage.setBool(me.appPrefix + "settings-autoformat-hyperlink", checked);
 | 
				
			||||||
 | 
					                    Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-hyperlink", checked);
 | 
				
			||||||
 | 
					                    me.api.asc_setAutoCorrectHyperlinks(checked);
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // AutoCorrect
 | 
					            // AutoCorrect
 | 
				
			||||||
| 
						 | 
					@ -372,7 +383,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
 | 
				
			||||||
                    this.inputRecFind, this.mathRecList, this.btnResetRec, this.btnAddRec, this.btnDeleteRec, // 1 tab
 | 
					                    this.inputRecFind, this.mathRecList, this.btnResetRec, this.btnAddRec, this.btnDeleteRec, // 1 tab
 | 
				
			||||||
                    this.chFLSentence // 3 tab
 | 
					                    this.chFLSentence // 3 tab
 | 
				
			||||||
                ];
 | 
					                ];
 | 
				
			||||||
            arr = arr.concat(this.chNewRows ? [this.chNewRows] : [this.chQuotes, this.chHyphens, this.chBulleted, this.chNumbered]);
 | 
					            arr = arr.concat(this.chNewRows ? [this.chHyperlink, this.chNewRows] : [this.chQuotes, this.chHyphens, this.chBulleted, this.chNumbered]);
 | 
				
			||||||
            return arr;
 | 
					            return arr;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -441,7 +452,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
 | 
				
			||||||
        onAutoformatCategoryClick: function(delay) {
 | 
					        onAutoformatCategoryClick: function(delay) {
 | 
				
			||||||
            var me = this;
 | 
					            var me = this;
 | 
				
			||||||
            _.delay(function(){
 | 
					            _.delay(function(){
 | 
				
			||||||
                me.chNewRows ? me.chNewRows.focus() : me.chQuotes.focus();
 | 
					                me.chHyperlink ? me.chHyperlink.focus() : me.chQuotes.focus();
 | 
				
			||||||
            },delay ? 50 : 0);
 | 
					            },delay ? 50 : 0);
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -816,7 +827,8 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
 | 
				
			||||||
        textApplyAsWork: 'Apply as you work',
 | 
					        textApplyAsWork: 'Apply as you work',
 | 
				
			||||||
        textNewRowCol: 'Include new rows and columns in table',
 | 
					        textNewRowCol: 'Include new rows and columns in table',
 | 
				
			||||||
        textAutoCorrect: 'AutoCorrect',
 | 
					        textAutoCorrect: 'AutoCorrect',
 | 
				
			||||||
        textFLSentence: 'Capitalize first letter of sentences'
 | 
					        textFLSentence: 'Capitalize first letter of sentences',
 | 
				
			||||||
 | 
					        textHyperlink: 'Internet and network paths with hyperlinks'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }, Common.Views.AutoCorrectDialog || {}))
 | 
					    }, Common.Views.AutoCorrectDialog || {}))
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2497,6 +2497,10 @@ define([
 | 
				
			||||||
                Common.Utils.InternalSettings.set("sse-settings-autoformat-new-rows", value);
 | 
					                Common.Utils.InternalSettings.set("sse-settings-autoformat-new-rows", value);
 | 
				
			||||||
                me.api.asc_setIncludeNewRowColTable(value);
 | 
					                me.api.asc_setIncludeNewRowColTable(value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                value = Common.localStorage.getBool("sse-settings-autoformat-hyperlink", true);
 | 
				
			||||||
 | 
					                Common.Utils.InternalSettings.set("sse-settings-autoformat-hyperlink", value);
 | 
				
			||||||
 | 
					                me.api.asc_setAutoCorrectHyperlinks(value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                value = Common.localStorage.getBool("sse-settings-autoformat-fl-sentence", true);
 | 
					                value = Common.localStorage.getBool("sse-settings-autoformat-fl-sentence", true);
 | 
				
			||||||
                Common.Utils.InternalSettings.set("sse-settings-autoformat-fl-sentence", value);
 | 
					                Common.Utils.InternalSettings.set("sse-settings-autoformat-fl-sentence", value);
 | 
				
			||||||
                me.api.asc_SetAutoCorrectFirstLetterOfSentences && me.api.asc_SetAutoCorrectFirstLetterOfSentences(value);
 | 
					                me.api.asc_SetAutoCorrectFirstLetterOfSentences && me.api.asc_SetAutoCorrectFirstLetterOfSentences(value);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -171,6 +171,7 @@
 | 
				
			||||||
  "Common.Views.AutoCorrectDialog.warnRestore": "The autocorrect entry for %1 will be reset to its original value. Do you want to continue?",
 | 
					  "Common.Views.AutoCorrectDialog.warnRestore": "The autocorrect entry for %1 will be reset to its original value. Do you want to continue?",
 | 
				
			||||||
  "Common.Views.AutoCorrectDialog.textAutoCorrect": "AutoCorrect",
 | 
					  "Common.Views.AutoCorrectDialog.textAutoCorrect": "AutoCorrect",
 | 
				
			||||||
  "Common.Views.AutoCorrectDialog.textFLSentence": "Capitalize first letter of sentences",
 | 
					  "Common.Views.AutoCorrectDialog.textFLSentence": "Capitalize first letter of sentences",
 | 
				
			||||||
 | 
					  "Common.Views.AutoCorrectDialog.textHyperlink": "Internet and network paths with hyperlinks",
 | 
				
			||||||
  "Common.Views.Chat.textSend": "Send",
 | 
					  "Common.Views.Chat.textSend": "Send",
 | 
				
			||||||
  "Common.Views.Comments.textAdd": "Add",
 | 
					  "Common.Views.Comments.textAdd": "Add",
 | 
				
			||||||
  "Common.Views.Comments.textAddComment": "Add Comment",
 | 
					  "Common.Views.Comments.textAddComment": "Add Comment",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue