Brett

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 66 total)
  • Author
    Posts
  • in reply to: v0.9.0.16 has been published #36204
    Brett
    Participant

      Hi Alexander,
      Please don’t waste any time on this.
      I was able to upload the v.0.9.0.16 package using my home computer connected to my corp 365 in the browser.
      Can you also delete this comment history as it’s not really a bug with your Modern App Package, it sounds like a firewall block on my corp network.
      Thanks,
      Brett.

      in reply to: v0.9.0.16 has been published #36200
      Brett
      Participant

        Thanks Alexander,
        I tried that rebuild with same result.
        I have found it’s something to do with my company’s intranet blocking something during the upload.
        When I logged on to my dev 365 personal site and uploaded from home network, it uploads fine, no errors.
        So when I Log on to the same 365 dev site from company’s intranet, the upload error occurs.

        in reply to: v0.9.0.16 has been published #36198
        Brett
        Participant

          Hi Alexander,
          I tried Edge, IE11 and Firefox all have same error.
          It could be related to my Corp Intranet blocking something in the js file.
          Difficult to decipher the console log, seems like generic errors:
          Uncaught (in promise) ItemOperationError: plt.listviewdataprefetch.js:2:102687
          I’ve got v0.9.0.0 to play with, so it’s not too important.
          Thanks for checking anyway.
          Brett.

          in reply to: v0.9.0.16 has been published #36195
          Brett
          Participant

            Hi Alexander,
            I’m just testing this on my own.
            From further testing, the file dffs-command-set_e20ee710c94bda4b8391.js file displays error when uploading it to a 365 doc library but a SP2016 doc library upload works.
            Also, when I pasted the code from dffs-command-set_e20ee710c94bda4b8391.js to a Beautify Javascript website, so it’s formatted correctly, the new file uploads to my 365 doc library 100% with no errors.
            Dev console error attached.

            Brett.

            in reply to: v0.9.0.16 has been published #36193
            Brett
            Participant

              Hi Alexander,
              Just a follow-up, when I extraced the App package and uploaded the ClientSideAssets folder to a doc library, 1 file failed to upload:
              dffs-command-set_e20ee710c94bda4b8391.js

              Brett

              in reply to: v0.9.0.16 has been published #36191
              Brett
              Participant

                No errors when I upload v0.9.0.0.
                When I attempt to upload v0.9.0.16, it’s stuck on 0 of 1 complete.
                Error in console displays: Failed to load resource: net::ERR_CONNECTION_RESET
                Full Console error attached.
                Hope that helps.

                in reply to: v0.9.0.16 has been published #36188
                Brett
                Participant

                  Hi Alexander, When I try uploading the latest few versions, my Site Collection app catalog is stuck on uploading 0 of 1, so I have to cancel it.

                  If I use an older version like 0.9.0.0 it uploads instantly and dialog window displays Trust acknowledgement.

                  • This reply was modified 2 years, 2 months ago by Brett. Reason: replace option doesn't work
                  in reply to: The Modern DFFS is finally here! #36159
                  Brett
                  Participant

                    Thanks Alexander, The Admins gave me a Developer Site Collection for deploying apps which doesn’t work so I’ll ask for a Site Collection App catalog.

                    in reply to: The Modern DFFS is finally here! #36155
                    Brett
                    Participant

                      Hi Alexander,
                      We should be moving to 365 next year.
                      I won’t have access to the App Catalog and the gate-keepers here won’t allow this to be installed.

                      Can this be installed on a single Site Collection, just like classic DFFS?

                      in reply to: Modify HitCounter script to Add to Favourites button #34717
                      Brett
                      Participant

                        Hi Alexander, thanks for the reply.
                        It looks like the manual refresh trigger for the Shortlist reloads both web-parts.
                        Basically, my goal is to get it functioning like this page, to click the button with no page refresh. https://www.chisholm.edu.au/career-fields/it-and-cybersecurity

                        So after some research I found how to refresh a list row: https://learning.xylos.com/en/blog/ajax-refresh-for-item-rows-in-sharepoint-2013-view

                        
                        
                        // Set Ajax refresh context
                          var evtAjax = {
                            currentCtx: ctx,
                            csrAjaxRefresh: true
                          };
                          // Initiate Ajax Refresh on the list
                          AJAXRefreshView(evtAjax, SP.UI.DialogResult.OK);    
                                }

                        So once added to the if(res.success) line, the Shortlist refreshes perfectly but the button does not.
                        So I just need to figure out how to refresh the button when clicked.

                        Also, the permission issue is resolved, it just wasn’t loading the scripts correctly with Read access, needed to Shift-F5 the page a few times for the buttons to load.

                        Thanks.

                        • This reply was modified 3 years, 2 months ago by Brett.
                        in reply to: Modify HitCounter script to Add to Favourites button #34682
                        Brett
                        Participant

                          Hi Alexander,

                          I’ve finally got this code working from a button in the List View.
                          Taken me about 3 weeks to reverse engineer each line to figure out how it worked, well worth it.
                          Just wondering if you have time to make some last adjustments?
                          1: The buttons reload each time an item is added or removed. Are you able to make it change the single button only?
                          2: For some reason, my Test User needs at least Contribute permission to the Courses list for the buttons to render, if user has Read permissions, error in console: Uncaught TypeError: jQspjs(…).filterNode is not a function.

                          Code for Calc Column: *Note the ID is copied to CoursesID via workflow.

                          ="<img src='/_layouts/images/BLANK.GIF' onload=""getIsFavorite('"&CourseID&"')"" ><span id='favBtnPlaceholder"&CourseID&"'></span>"

                          I’ve changed the “Favorites” list to “Shortlist”.
                          Also to make the button ID unique, I added the courseID number to the #favBtnPlaceholder.
                          Code for CEWP:

                          
                          
                          <a href="/sites/server/training/SPJS/DFFS/plugins/jquery.js">/sites/server/training/SPJS/DFFS/plugins/jquery.js</a>
                          <a href="/sites/server/training/SPJS/DFFS/plugins/SPJS-utility.js">/sites/server/training/SPJS/DFFS/plugins/SPJS-utility.js</a>
                          
                          <script type="text/javascript"> 
                          // Current issues:
                          // all buttons load each time an item is added to shortlist
                          // user must have contribute access to Courses list to generate buttons.
                          
                          function getIsFavorite(courseID){
                            var currDocRes, favRes, b = [];
                          
                          //grabs column variables from Courses list
                           currDocRes = spjs.utility.getItemByID({
                          		"listName":"Courses",
                          		"id":courseID,
                          		"viewFields":["ID","Title","Group","Series","TextURL"]
                          		});
                          
                            if(currDocRes !== null){ //checks if exisiting item in Shortlist
                                  favRes = spjs.utility.queryItems({
                          			"listName":"Shortlist",
                          			"query":"<Where><And><Eq><FieldRef Name='Author' LookupId='TRUE' /><Value Type='User'>"+_spPageContextInfo.userId+"</Value></Eq><Eq><FieldRef Name='Title' /><Value Type='Text'>"+currDocRes.Title+"</Value></Eq></And></Where>",
                          			"viewFields":["ID"]		
                          			});
                                  if(favRes.count === 0){
                                  b.push("<input type='button' style='background-color:green;color:white;cursor: pointer' value='Add to Shortlist' onclick='toggleDocFav(false,\""+currDocRes.ID+"\",\""+currDocRes.Title+"\",\""+currDocRes.Group+"\",\""+currDocRes.Series+"\",\""+currDocRes.TextURL+"\")'>");       
                                  }else{
                                      b.push("<input type='button' style='background-color:yellow;cursor: pointer' value='Remove from Shortlist' onclick='toggleDocFav(\""+favRes.items[0].ID+"\",\""+currDocRes.Title+"\")'>");
                                  }
                              }
                              jQuery("#favBtnPlaceholder"+courseID).html(b.join(""));
                          }
                          
                          function toggleDocFav(shortlistid,courseID,parentTitle,parentGroup,parentSeries,parentURL,parentDescription){
                              var res;
                                    
                              if(!shortlistid){
                                  // add to Shortlist                
                                  res = spjs.utility.addItem({
                                  "listName":"Shortlist",
                                  "data":{
                                  	"CourseID": courseID,
                                  	"Title": parentTitle,
                                  	"Group": parentGroup,
                                  	"Series": parentSeries,
                                  	"Link": parentURL
                                  	}
                                  });  
                             	
                                  if(res.success){
                                    //  alert("Successfully added as favourite");
                                        // Refresh Shortlist web part              
                                      __doPostBack("ctl00$ctl39$g_388e590e_26cf_4a7d_8a6b_07c09678368a$ctl03","cancel");return false;
                                      getIsFavorite();           
                                  }
                              }else{
                                  res = spjs.utility.deleteItem({
                                  "listName":"Shortlist",
                                  "id":faveid
                                  });
                              
                                  if(res.success){
                                     // alert("Successfully removed from favourite");
                                             // Refresh Shortlist web part    
                                    __doPostBack("ctl00$ctl39$g_388e590e_26cf_4a7d_8a6b_07c09678368a$ctl03","cancel");return false;       
                                      getIsFavorite();                        
                                  }
                              }
                          }
                          </script>

                          Let me know if any further details needed.
                          Thanks.

                          in reply to: Modify HitCounter script to Add to Favourites button #34437
                          Brett
                          Participant

                            I got it, before the line: res = spjs.utility.addItem, I added the following:

                            var parentcourseID = getFieldValue("ID");

                            Then changed that line to:

                            res = spjs.utility.addItem({"listName":"Favourites","data":{"Title":url,"CourseID":parentcourseID}});

                            The Courses list ID now shows in the Favourites list.
                            I’ll try to figure out the other columns as well.
                            Thanks Alexander.

                            in reply to: Modify HitCounter script to Add to Favourites button #34435
                            Brett
                            Participant

                              Hi Alexander,
                              So with ID, and Title:
                              The other field types would be Description = multi-line text column(HTML) and
                              Link to Course = hyperlink or picture (Format URL as Hyperlink).
                              Thanks.

                              in reply to: Modify HitCounter script to Add to Favourites button #34413
                              Brett
                              Participant

                                Hi Alexander,

                                I’m looking at using this Add to Favorite/Bookmark solution to be used in a list.
                                Right now it’s set for a document library, so the value in the Title column shows as: https://sharepointserver.com.au/sites/training/Lists/Courses/71_.000 (71 is the ID)

                                The scenario is a list of training courses, which an employee can choose to add them to their My Learning list.
                                They can either click a button on the Course Display Form or a click a button next to each item in the List View.

                                1: Are you able to modify the code above to push the Course fields (ID, Title, Description, Category, link to course) to the My Learning list?

                                2: If it can’t be done from a list view, I’ll try to wire up a vLookup using the Parent ID and Author as a search query.

                                I looked at your Workflow button but I’m using SP2016 with Nintex workflows, so it’s very different.

                                Thanks for your time,

                                Brett

                                in reply to: Deploy DFFS from one location #34253
                                Brett
                                Participant

                                  This is a good idea Travis.
                                  Would be good to keep all DFFS files in the one location.

                                  Alexander, Further to Travis’s point:
                                  Has there also been any consideration for hosting DFFS files in a CDN repository?

                                Viewing 15 posts - 1 through 15 (of 66 total)