Browse Source

Merge branch 'develop' into feature/multiselect-filtercontrol

Dennis Hernández 4 years ago
parent
commit
608d53f2ad

+ 3 - 5
src/extensions/cookie/bootstrap-table-cookie.js

@@ -458,16 +458,14 @@ $.BootstrapTable = class extends $.BootstrapTable {
       throw new Error('Could not parse the json of the sortPriority cookie!', sortPriorityCookie)
     }
 
-    // sortOrder
-    this.options.sortOrder = undefined
-    // sortName
-    this.options.sortName = undefined
-
     if (!sortPriorityCookie) {
       // sortOrder
       this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder
       // sortName
       this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName
+    } else {
+      this.options.sortOrder = undefined
+      this.options.sortName = undefined
     }
 
     // sortPriority

+ 3 - 1
src/extensions/print/bootstrap-table-print.js

@@ -277,7 +277,9 @@ $.BootstrapTable = class extends $.BootstrapTable {
     const table = buildTable(data, this.options.columns)
     const newWin = window.open('')
 
-    newWin.document.write(this.options.printPageBuilder.call(this, table))
+    const calculatedPrintPage = Utils.calculateObjectValue(this, this.options.printPageBuilder, [table], printPageBuilderDefault(table))
+
+    newWin.document.write(calculatedPrintPage)
     newWin.document.close()
     newWin.focus()
     newWin.print()